:root {
  color-scheme: dark;
  --ink: #f0f2ff;
  --muted: #8d94b8;
  --indigo: #7784ff;
  --violet: #aa85ff;
  --midnight: #080b18;
  --panel: #10152a;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--midnight);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100svh;
  background: radial-gradient(
    circle at 50% 32%,
    #151c3d 0,
    var(--midnight) 44%
  );
}
button,
input {
  font: inherit;
}
button {
  color: inherit;
}
main {
  width: min(100%, 48rem);
  min-height: 100svh;
  margin: auto;
  padding: max(1.25rem, env(safe-area-inset-top)) 1.25rem
    max(1.25rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.eyebrow {
  margin: 0 0 0.35rem;
  color: var(--indigo);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}
h1 {
  margin: 0;
  font-family:
    "Arial Narrow", "Roboto Condensed", Impact, system-ui, sans-serif;
  font-size: clamp(2rem, 9vw, 4rem);
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}
h1 span {
  color: var(--muted);
}
.connection {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.72rem;
  white-space: nowrap;
}
.connection i {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #66d6a0;
  box-shadow: 0 0 0.7rem #66d6a0;
}
.connection.offline i {
  background: #ff7186;
  box-shadow: none;
}
.room {
  flex: 1;
  min-height: 21rem;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 2rem 0 1rem;
}
.orbit {
  position: relative;
  width: min(64vw, 17rem);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}
.ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgb(119 132 255 / 0.35);
  border-radius: 43% 57% 52% 48% / 57% 42% 58% 43%;
}
.ring-two {
  inset: 8%;
  border-color: rgb(170 133 255 / 0.3);
  transform: rotate(67deg);
}
.orbit[data-state="listening"] .ring,
.orbit[data-state="thinking"] .ring,
.orbit[data-state="speaking"] .ring {
  animation: orbit 3s linear infinite;
  border-width: 2px;
}
.orbit[data-state="listening"] .ring-two {
  animation-duration: 1.4s;
}
.orbit[data-state="speaking"] .ring {
  animation-duration: 1.1s;
}
.call {
  position: relative;
  z-index: 1;
  width: 67%;
  aspect-ratio: 1;
  border: 1px solid #8490ff;
  border-radius: 50%;
  background: #111737;
  box-shadow:
    inset 0 0 2rem rgb(119 132 255 / 0.18),
    0 0 3rem rgb(58 69 160 / 0.22);
  cursor: pointer;
  display: grid;
  place-content: center;
  gap: 0.35rem;
  transition:
    transform 0.18s,
    background 0.18s;
}
.call:hover {
  transform: scale(1.03);
}
.call:active {
  transform: scale(0.97);
}
.call .phone {
  font-size: 2.2rem;
  line-height: 0.8;
  transform: rotate(-32deg);
}
.call strong {
  font-size: 0.8rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.orbit[data-state]:not([data-state="idle"]) .call {
  background: #202754;
}
.status {
  margin: 1.25rem 0 0;
  font-weight: 700;
}
.interim {
  min-height: 1.3em;
  max-width: 90vw;
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-style: italic;
  text-align: center;
}
.conversation {
  max-height: 14rem;
  overflow-y: auto;
  border-top: 1px solid #242b4a;
  padding: 0.75rem 0;
  scrollbar-color: #313960 transparent;
}
.conversation ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
.conversation li {
  max-width: 88%;
  font-size: 0.92rem;
  line-height: 1.45;
}
.conversation li[data-role="user"] {
  justify-self: end;
  color: #cbd0ee;
  text-align: right;
}
.conversation li[data-role="assistant"] {
  border-left: 2px solid var(--violet);
  padding-left: 0.75rem;
}
#empty {
  color: #687093;
  font-size: 0.78rem;
}
.guidance {
  margin: 0.5rem 0 1rem;
  border-left: 2px solid #ffb566;
  background: #19182a;
  padding: 0.8rem;
  color: #d9d9eb;
  font-size: 0.8rem;
  line-height: 1.45;
}
.guidance strong {
  display: block;
  color: #ffca8b;
}
.composer {
  margin-top: 0.5rem;
}
.composer label {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.composer div {
  display: flex;
  border-bottom: 1px solid #465078;
}
.composer input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 0.8rem 0.1rem;
  outline: 0;
}
.composer input::placeholder {
  color: #555d7e;
}
.composer button {
  width: 2.8rem;
  border: 0;
  background: transparent;
  color: var(--indigo);
  font-size: 1.4rem;
  cursor: pointer;
}
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 1rem;
  color: #697193;
  font-size: 0.67rem;
}
footer button {
  border: 1px solid #343c61;
  border-radius: 2rem;
  background: transparent;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
}
button:focus-visible,
input:focus-visible {
  outline: 3px solid #b7beff;
  outline-offset: 3px;
}
@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
@media (min-width: 42rem) {
  main {
    padding-inline: 2rem;
  }
  .room {
    min-height: 25rem;
  }
}
