@import url('fonts.css');
:root {
  --ink: #e9ecf4;
  --dim: #9aa3b8;
  --veil: rgba(4, 6, 14, .72);
  --line: rgba(233, 236, 244, .28);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #04050b; color: var(--ink); overflow: hidden; }
body { font: 300 16px/1.5 'Averia Sans Libre', 'Trebuchet MS', sans-serif; }
#view { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; touch-action: none; cursor: none; }
#hand, #held { position: fixed; pointer-events: none; display: none; z-index: 2; user-select: none; }
#held { z-index: 1; }

/* Top bar: the way back, and sound. */
.bar { position: fixed; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; z-index: 4; pointer-events: none; font-size: 14px; }
.bar a, .bar button { pointer-events: auto; color: var(--dim); background: none; border: 0; font: inherit; padding: 6px 0; cursor: pointer; text-decoration: none; }
.bar a:hover, .bar button:hover, .bar a:focus-visible, .bar button:focus-visible { color: var(--ink); }

/* Before the piece starts: its sentence, and the press that unlocks sound. */
#begin { position: fixed; inset: 0; width: 100%; height: 100%; margin: 0; z-index: 3; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 22px; padding: 24px 16px; border: 0; background: var(--veil); color: var(--ink); font: inherit; cursor: pointer; text-align: center;
  transition: opacity .9s ease; }
#begin[hidden] { display: flex; opacity: 0; pointer-events: none; }
#begin .sentence { font-size: clamp(26px, 5vw, 46px); font-style: italic; font-weight: 300; max-width: 20em; line-height: 1.22; }
#begin .how { font-size: 15px; color: var(--dim); max-width: 26em; }
#begin .press { font-size: 14px; font-weight: 400; color: var(--dim); letter-spacing: .14em; text-transform: uppercase; }
#begin:disabled { cursor: progress; }

/* After it ends: the sentence again and where to go next. The scene stays live behind it. */
#ending { position: fixed; left: 50%; bottom: 7vh; transform: translateX(-50%); z-index: 3; width: min(92vw, 34em);
  padding: 20px 22px; background: var(--veil); border: 1px solid var(--line); text-align: center; opacity: 0; transition: opacity 1.6s ease; }
#ending.shown { opacity: 1; }
#ending .sentence { font-style: italic; font-size: clamp(18px, 3vw, 24px); margin: 0 0 14px; }
#ending nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font-size: 15px; }
#ending a, #ending button { color: var(--ink); background: none; border: 0; font: inherit; padding: 0; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
#status { position: fixed; left: 16px; bottom: 12px; z-index: 4; font-size: 13px; color: var(--dim); margin: 0; }
