:root {
  --background: #fbfaf7;
  --foreground: #111111;
  --muted: #6f6f6f;
  --border: #d7d3cc;
  --focus: #111111;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  font-family: Georgia, "Times New Roman", serif;
}

button,
input {
  font: inherit;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.shell {
  width: 100%;
  max-width: 760px;
  display: grid;
  gap: 28px;
  text-align: center;
}

.title {
  margin: 0;
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.form {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: stretch;
  width: 100%;
}

.input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #ffffff;
  padding: 16px 20px;
  color: var(--foreground);
}

.input::placeholder {
  color: var(--muted);
}

.button {
  border: 1px solid var(--foreground);
  border-radius: 999px;
  background: var(--foreground);
  color: #ffffff;
  padding: 16px 24px;
  cursor: pointer;
  transition: opacity 120ms ease;
}

.button:hover:not(:disabled) {
  opacity: 0.88;
}

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

.result-wrap {
  min-height: 12rem;
  display: grid;
  place-items: center;
}

.result {
  margin: 0;
  max-width: 18ch;
  font-size: clamp(2.75rem, 10vw, 6rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.06em;
  text-wrap: balance;
}

.meta {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.choices {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.choice-button {
  border: 1px solid var(--foreground);
  border-radius: 999px;
  background: var(--foreground);
  color: #ffffff;
  padding: 10px 18px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 120ms ease;
}

.choice-button:hover:not(:disabled) {
  opacity: 0.88;
}

.choice-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  .page {
    padding: 20px;
  }

  .shell {
    gap: 20px;
  }

  .form {
    flex-direction: column;
  }

  .button,
  .input {
    width: 100%;
  }

  .result-wrap {
    min-height: 10rem;
  }
}
