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

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(56, 189, 248, .22), transparent 16rem),
    radial-gradient(circle at 50% 100%, rgba(124, 58, 237, .2), transparent 24rem),
    linear-gradient(160deg, #020617, #05070d 48%, #111827);
}

.app {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.stage {
  width: min(100%, 430px);
  display: grid;
  place-items: center;
  gap: 22px;
}

.orb-button {
  position: relative;
  width: min(58vw, 230px);
  height: min(58vw, 230px);
  min-width: 168px;
  min-height: 168px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: transparent;
  cursor: pointer;
  outline: none;
  transform: translateZ(0);
}

.orb-button:disabled {
  opacity: .55;
}

.orb-button:focus-visible {
  filter: drop-shadow(0 0 0.75rem rgba(191, 219, 254, .9));
}

.orb-glow,
.orb-core {
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.orb-glow {
  background:
    radial-gradient(circle at 50% 50%, rgba(125, 211, 252, .8), rgba(37, 99, 235, .2) 42%, transparent 72%);
  filter: blur(18px);
  transform: scale(1.18);
  opacity: .9;
}

.orb-core {
  background:
    radial-gradient(circle at 35% 28%, #ffffff 0 8%, #bae6fd 17%, #38bdf8 34%, #2563eb 58%, #0f172a 84%);
  box-shadow:
    inset -22px -30px 42px rgba(2, 6, 23, .55),
    inset 18px 18px 34px rgba(255, 255, 255, .22),
    0 0 54px rgba(96, 165, 250, .7),
    0 0 120px rgba(37, 99, 235, .42);
}

.orb-button::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, .25);
  opacity: .55;
}

.orb-button.recording .orb-glow {
  animation: glow-pulse 1.1s ease-in-out infinite alternate;
  background:
    radial-gradient(circle at 50% 50%, rgba(251, 146, 60, .9), rgba(220, 38, 38, .24) 46%, transparent 74%);
}

.orb-button.recording .orb-core {
  background:
    radial-gradient(circle at 35% 28%, #ffffff 0 8%, #fed7aa 18%, #fb923c 36%, #dc2626 62%, #1f0b0b 86%);
}

@keyframes glow-pulse {
  from {
    transform: scale(1.08);
    opacity: .7;
  }
  to {
    transform: scale(1.28);
    opacity: 1;
  }
}

.status {
  min-height: 28px;
  max-width: 320px;
  margin: 0;
  text-align: center;
  color: rgba(226, 232, 240, .92);
  font-size: 15px;
  line-height: 1.4;
}

.setup {
  width: min(100%, 320px);
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 20px;
  background: rgba(15, 23, 42, .72);
  backdrop-filter: blur(18px);
}

label {
  font-size: 13px;
  color: #cbd5e1;
}

input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 14px;
  padding: 14px 15px;
  background: rgba(255, 255, 255, .08);
  color: white;
  font-size: 18px;
  text-align: center;
}

.save-token {
  border: 0;
  border-radius: 14px;
  padding: 13px 16px;
  color: white;
  background: #2563eb;
  font-size: 16px;
  font-weight: 700;
}

audio {
  display: none;
}

.last-exchange {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  max-width: 420px;
  margin: 0 auto;
  color: rgba(203, 213, 225, .75);
  font-size: 12px;
  text-align: center;
}

summary {
  cursor: pointer;
  color: rgba(147, 197, 253, .8);
}

.usage {
  opacity: .75;
  font-size: 11px;
}
