:root {
  --night: #2c2a4a;
  --gold: #c9a25e;
  --cream: #f5efe3;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: 1fr auto;
  background: var(--night);
  color: var(--cream);
  font-family: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  text-align: center;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

main {
  display: grid;
  place-items: center;
  align-content: center;
  /* grid-gap first — plain gap on grid needs Chrome 66, floor is 61 */
  grid-gap: 2.6rem;
  gap: 2.6rem;
  padding: 2rem;
}

/* The ? — her whole vocabulary, said before any words. Large, unhurried. */
h1 {
  font-weight: normal;
  font-size: 4.2rem;
  line-height: 1;
  color: var(--gold);
  margin: 0;
}

#line {
  font-size: 1.35rem;
  line-height: 1.5;
  max-width: 22ch;
  margin: 0;
  min-height: 4.5em; /* holds its slot, so arriving reflows nothing */
  opacity: 0;
  transition: opacity 1.6s ease;
}

#line.showing { opacity: 1; }

/* One thin line to type into. */
#say { width: 100%; max-width: 24rem; }

#input {
  width: 100%;
  font: inherit;
  font-size: 1.05rem; /* 16px+ so mobile browsers do not zoom the page */
  text-align: center;
  color: var(--cream);
  background: none;
  border: none;
  border-bottom: 1px solid rgba(201, 162, 94, 0.45);
  border-radius: 0;
  padding: 0.4rem 0.2rem;
  outline: none;
  caret-color: var(--gold);
}

/* Focus is the line waking up — the only focusable thing on the page. */
#input:focus { border-bottom-color: var(--gold); }

footer {
  font-size: 0.72rem;
  opacity: 0.55;
  padding: 0 1rem 1.1rem;
}

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