:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
  background: #071014;
  color: #f3faf8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 50% 30%, rgba(49, 203, 173, .14), transparent 38%),
    linear-gradient(180deg, #071014, #0b171a);
}

main {
  min-height: 100dvh;
  padding: max(28px, env(safe-area-inset-top)) 24px max(28px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .34em;
  color: #74d9c3;
}

.voice-stage { text-align: center; }

.orb {
  width: min(58vw, 230px);
  aspect-ratio: 1;
  margin: 0 auto 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 36% 30%, #b9fff0, #2ccba9 30%, #0d5e57 70%, #092f32);
  box-shadow: 0 0 60px rgba(44, 203, 169, .22), inset -20px -25px 45px rgba(0, 0, 0, .38);
  transition: transform .3s ease, filter .3s ease;
}

.orb span {
  width: 34%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .7);
  box-shadow: 0 0 25px rgba(255, 255, 255, .6);
}

.orb.connecting { animation: breathe 1.1s ease-in-out infinite; }
.orb.active { animation: breathe 2.2s ease-in-out infinite; filter: saturate(1.15); }
.orb.speaking { animation: speak .65s ease-in-out infinite alternate; }

@keyframes breathe { 50% { transform: scale(1.045); } }
@keyframes speak { to { transform: scale(1.09); filter: brightness(1.18); } }

h1 { margin: 0 0 10px; font-size: 27px; letter-spacing: -.02em; }
p { margin: 0 auto; max-width: 330px; color: #9bb5b1; line-height: 1.45; }

.pairing {
  width: min(100%, 420px);
  padding: 18px;
  border: 1px solid rgba(116, 217, 195, .2);
  border-radius: 18px;
  background: rgba(255, 255, 255, .045);
}

.pairing label { display: block; margin-bottom: 8px; color: #bed1cd; font-size: 14px; }
.pairing input {
  width: 100%;
  padding: 14px;
  border: 1px solid #2b4a48;
  border-radius: 12px;
  background: #0b171a;
  color: white;
  font-size: 17px;
}

button { font: inherit; }
.call, .secondary {
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}
.call {
  width: min(100%, 420px);
  padding: 17px 24px;
  background: #79ead1;
  color: #06211d;
  font-size: 17px;
  box-shadow: 0 12px 35px rgba(44, 203, 169, .2);
}
.call.stop { background: #ff817a; color: #2d0907; }
.call:disabled { opacity: .55; }
.secondary { margin-top: 12px; padding: 12px 18px; background: #204c47; color: white; }
.text-button { border: 0; background: none; color: #72918c; font-size: 13px; }
.hidden { display: none; }
#audio audio { display: none; }
