* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background: #000;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  font-family: 'Courier New', ui-monospace, monospace;
}

#stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none; /* the face is not draggable / not interactive */
  user-select: none;
}

#face {
  width: min(42vh, 60vw);
  height: min(42vh, 60vw);
  object-fit: contain;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
  filter: drop-shadow(0 0 40px rgba(90, 130, 100, 0.08));
  transition: filter 0.6s ease;
}

#face.talking {
  filter: drop-shadow(0 0 55px rgba(90, 150, 110, 0.16));
}

#bar {
  position: fixed;
  left: 50%;
  bottom: max(6vh, env(safe-area-inset-bottom, 24px));
  transform: translateX(-50%);
  width: min(520px, 88vw);
}

#input {
  width: 100%;
  background: #050505;
  border: 1px solid #2a2a2a;
  border-radius: 999px;
  padding: 14px 20px;
  color: #d8d8d8;
  font-family: inherit;
  font-size: 15px;
  letter-spacing: 0.02em;
  outline: none;
  caret-color: #6fae7f;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#input::placeholder {
  color: #4a4a4a;
  font-style: italic;
}

#input:focus {
  border-color: #3c5a44;
  box-shadow: 0 0 0 1px #3c5a44, 0 0 22px rgba(63, 110, 80, 0.15);
}

#input:disabled {
  opacity: 0.5;
}

@media (prefers-reduced-motion: reduce) {
  #face, #input {
    transition: none;
  }
}
