:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #071015;
  color: #eef8f7;
  --cyan: #69e7db;
  --cyan-soft: rgba(105, 231, 219, 0.18);
  --panel: rgba(255, 255, 255, 0.055);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; overflow: hidden; }
body {
  min-height: 100svh;
  background:
    radial-gradient(circle at 50% 28%, rgba(42, 141, 140, .24), transparent 38%),
    linear-gradient(165deg, #071015 0%, #0a171d 55%, #050b0e 100%);
}
button { font: inherit; }
.shell {
  min-height: 100svh;
  max-width: 640px;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 20px max(22px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 18px;
}
header { display: flex; align-items: center; justify-content: space-between; }
.eyebrow { color: #9eb9b8; font-size: 12px; font-weight: 700; letter-spacing: .2em; }
.icon-button { border: 0; background: transparent; color: #aec0c0; font-size: 30px; padding: 2px 8px; }
.presence { align-self: center; text-align: center; }
.presence h1 { margin: 20px 0 4px; font-size: 30px; letter-spacing: .02em; }
.status { min-height: 24px; margin: 0; color: #9db3b2; }
.avatar {
  position: relative; width: 184px; height: 184px; margin: 0 auto; display: grid; place-items: center;
  padding: 0; border: 0; color: inherit; background: transparent;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.avatar:disabled { opacity: 1; }
.avatar.pressed .core { transform: scale(.97); box-shadow: 0 0 44px rgba(105,231,219,.42), inset 0 0 25px rgba(255,255,255,.1); }
.ring { position: absolute; inset: 15px; border: 1px solid rgba(105, 231, 219, .45); border-radius: 50%; }
.ring-two { inset: 1px; border-color: rgba(105, 231, 219, .18); }
.core {
  width: 122px; height: 122px; display: grid; place-items: center; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #416f72, #10262d 48%, #071116 76%);
  box-shadow: 0 0 35px rgba(72, 210, 201, .24), inset 0 0 25px rgba(255,255,255,.08);
  border: 1px solid rgba(142, 255, 244, .35);
}
.core span { font-size: 48px; filter: saturate(.8); }
.avatar[data-state="listening"] .ring-one { animation: pulse 1s ease-in-out infinite; }
.avatar[data-state="thinking"] .ring-one { animation: spin 2.5s linear infinite; border-top-color: transparent; }
.avatar[data-state="speaking"] .ring-one, .avatar[data-state="speaking"] .ring-two { animation: pulse .55s ease-in-out infinite alternate; }
@keyframes pulse { from { transform: scale(.92); opacity: .55; } to { transform: scale(1.08); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
.transcript {
  min-height: 82px; max-height: 18svh; overflow-y: auto; padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.07); border-radius: 16px; background: var(--panel);
  font-size: 14px; line-height: 1.45;
}
.transcript p { margin: 4px 0; }
.transcript .user { color: #d8f6f2; }
.transcript .axis { color: #9fd9d4; }
.hint { color: #78908f; text-align: center; }
.controls { display: grid; gap: 10px; }
.connect, .talk, .stop { border-radius: 18px; min-height: 54px; font-weight: 700; }
.connect { border: 0; color: #06201e; background: var(--cyan); }
.talk {
  border: 1px solid rgba(105,231,219,.55); color: #eafffc; background: var(--cyan-soft);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.talk:disabled { opacity: .35; }
.talk.pressed { transform: scale(.98); background: rgba(105,231,219,.34); box-shadow: 0 0 26px rgba(105,231,219,.18); }
.mic { margin-right: 8px; color: #7bfff1; }
.stop { border: 0; color: #aebdbc; background: transparent; min-height: 38px; }
.stop:disabled { display: none; }
