:root {
  --paper: #f4efe4;
  --ink: #5b5550;
  --soft: rgba(91, 85, 80, 0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

#canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
}

#center {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  pointer-events: none;
  transition: opacity 2.5s ease;
}

#center.gone { opacity: 0; }
#center.gone * { pointer-events: none !important; }

button {
  pointer-events: auto;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 252, 245, 0.55);
  border: 1px solid var(--soft);
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 1.5s ease, background 1s ease, border-color 1s ease;
}

button:hover { background: rgba(255, 252, 245, 0.85); border-color: rgba(91, 85, 80, 0.55); }
button:focus-visible { outline: 2px solid rgba(91, 85, 80, 0.5); outline-offset: 3px; }
button:disabled { opacity: 0.35; cursor: default; }

#start {
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  padding: 0.9rem 2.4rem;
}

#message {
  margin: 0;
  max-width: 34ch;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.5;
  opacity: 0.6;
}

#toggle {
  position: fixed;
  right: 1.2rem;
  bottom: 1.1rem;
  font-size: 0.85rem;
  padding: 0.4rem 1.1rem;
  opacity: 0.35;
}

#toggle:hover, #toggle:focus-visible { opacity: 0.9; }

#transcript {
  position: fixed;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  width: min(70ch, calc(100vw - 12rem));
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
  line-height: 1.5;
  font-style: italic;
  opacity: 0.35;
  pointer-events: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 600px) {
  #transcript { width: calc(100vw - 2rem); bottom: 3.6rem; }
}
