:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, "Noto Sans HK", sans-serif;
  background: #101528;
  color: #fff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: #101528;
}

button, input { font: inherit; }

.panel {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: clamp(1rem, 3vw, 2rem);
  gap: 1rem;
}

.companion {
  display: grid;
  place-content: center;
  text-align: center;
  min-height: 12rem;
}

.eyes {
  color: #ffdc5d;
  font-size: clamp(4rem, 15vw, 9rem);
  font-weight: 900;
  letter-spacing: .06em;
  line-height: 1;
}

.eyes-open { letter-spacing: .12em; }

.symbol {
  min-height: 1.4em;
  color: #ffdc5d;
  font-size: clamp(2.2rem, 7vw, 4.5rem);
  font-weight: 900;
}

.state-listening .symbol {
  animation: gentle-pulse 1.2s ease-in-out infinite;
}

.state-label {
  margin: .5rem 0;
  font-size: clamp(1.3rem, 4vw, 2rem);
}

.setup, .dialogue-box {
  border: clamp(4px, .7vw, 8px) solid #fff;
  border-radius: .5rem;
  background: #080b16;
  box-shadow: 0 0 0 4px #252d4c;
  padding: clamp(1rem, 3vw, 2rem);
}

.setup {
  align-self: end;
  font-size: clamp(1.15rem, 3vw, 1.6rem);
}

.setup h1 { margin-top: 0; }

.setup form { display: grid; gap: .75rem; }

input, button {
  min-height: 3.5rem;
  border: 3px solid #fff;
  border-radius: .35rem;
  padding: .65rem 1rem;
}

input { background: #fff; color: #111; }

button {
  background: #ffdc5d;
  color: #111;
  font-weight: 900;
  cursor: pointer;
}

button:focus-visible, input:focus-visible {
  outline: 5px solid #65d8ff;
  outline-offset: 3px;
}

button:disabled { opacity: .65; cursor: wait; }

.dialogue-box {
  font-size: clamp(1.45rem, 4.5vw, 2.5rem);
  font-weight: 700;
}

.dialogue-box p { margin: 0 0 1rem; }
.dialogue-box button { width: 100%; font-size: clamp(1.25rem, 3.5vw, 2rem); }
.dialogue-box .stt-note { margin: .75rem 0 0; font-size: clamp(.95rem, 2.3vw, 1.25rem); font-weight: 400; }

[hidden] { display: none !important; }

@keyframes gentle-pulse {
  0%, 100% { opacity: .55; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .state-listening .symbol { animation: none; }
}
