:root {
  --bg: #0b0a09;
  --ink: #e9e3d6;
  --dim: #8d8576;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: radial-gradient(ellipse at 50% 40%, #16140f 0%, var(--bg) 70%);
  color: var(--ink);
  overflow: hidden;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

#gas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ---- Start gate ---- */
#gate {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1.5rem;
  text-align: center;
  transition: opacity 1.2s ease;
}
#gate.gone { opacity: 0; pointer-events: none; }
#gate h1 {
  margin: 0;
  font-weight: 400;
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  letter-spacing: 0.04em;
  color: var(--dim);
}
#start {
  font: inherit;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--ink);
  background: transparent;
  border: 1px solid #5a5347;
  border-radius: 999px;
  padding: 0.8em 2em;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
#start:hover:not(:disabled), #start:focus-visible { background: #1d1a15; border-color: var(--ink); outline: none; }
#start:disabled { opacity: 0.4; cursor: default; }
#status { margin: 0; min-height: 1.2em; color: var(--dim); font-size: 0.9rem; }

/* ---- Quotes: front and center, very slow, very serious ---- */
#quote {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(48rem, 88vw);
  margin: 0;
  transform: translate(-50%, -50%) scale(0.985);
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--fade-out, 7s) ease-in-out, transform var(--fade-out, 7s) ease-in-out;
}
#quote.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  transition: opacity var(--fade-in, 9s) ease-in-out, transform calc(var(--fade-in, 9s) * 2) ease-out;
}
#quote .text {
  margin: 0 0 0.9em;
  font-style: italic;
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  line-height: 1.4;
  text-shadow: 0 0 1.2em rgba(0, 0, 0, 0.85); /* stays legible over the gas */
  white-space: pre-line; /* "\n" in quotes.json = line break */
  text-wrap: balance;
}
#quote .text::before { content: "\201C"; }
#quote .text::after { content: "\201D"; }
#quote .by {
  font-size: clamp(0.8rem, 1.4vw, 0.95rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
  text-wrap: balance;
}
#quote .by::before { content: "— "; }
