@font-face {
  font-family: Spectral;
  font-weight: 200;
  font-style: normal;
  font-display: swap;
  src: url(fonts/spectral-latin-200-normal.woff2) format("woff2");
}
@font-face {
  font-family: Spectral;
  font-weight: 200;
  font-style: italic;
  font-display: swap;
  src: url(fonts/spectral-latin-200-italic.woff2) format("woff2");
}
@font-face {
  font-family: Spectral;
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  src: url(fonts/spectral-latin-300-normal.woff2) format("woff2");
}
@font-face {
  font-family: Spectral;
  font-weight: 300;
  font-style: italic;
  font-display: swap;
  src: url(fonts/spectral-latin-300-italic.woff2) format("woff2");
}
@font-face {
  font-family: Spectral;
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url(fonts/spectral-latin-400-normal.woff2) format("woff2");
}
@font-face {
  font-family: Spectral;
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  src: url(fonts/spectral-latin-400-italic.woff2) format("woff2");
}
@font-face {
  font-family: Spectral;
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url(fonts/spectral-latin-500-normal.woff2) format("woff2");
}
@font-face {
  font-family: Spectral;
  font-weight: 500;
  font-style: italic;
  font-display: swap;
  src: url(fonts/spectral-latin-500-italic.woff2) format("woff2");
}
:root {
  --ink: #fdf6e3;
  --ink-2: rgb(253 246 227 / 0.72);
  --night: #0b1030;
  --glow: #ffe3a6;
  --serif: "Spectral", "Iowan Old Style", Palatino, Georgia, serif;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--night);
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  -webkit-tap-highlight-color: transparent;
}
canvas#world {
  position: fixed;
  inset: 0;
  display: block;
  touch-action: none;
  outline: none;
  cursor: default;
}
body.playing canvas#world {
  cursor: pointer;
}
canvas#blood {
  position: fixed;
  inset: 0;
  display: block;
  pointer-events: none;
}
.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;
}
.title {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background: radial-gradient(ellipse at 50% 60%, #0b103059, #050716e0);
  transition:
    opacity 2.4s ease,
    visibility 0s 2.4s;
  z-index: 5;
}
.title.gone {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.title-inner {
  max-width: 480px;
  text-align: center;
}
.title h1 {
  font-weight: 200;
  font-size: clamp(3rem, 12vw, 5.4rem);
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  margin: 0 0 6px;
  text-shadow: 0 0 40px rgb(255 220 170 / 0.25);
  animation: breathe 7s ease-in-out infinite;
}
.title-sub {
  font-size: 1.2rem;
  letter-spacing: 0.02em;
  font-style: italic;
  margin: 0 0 22px;
  color: var(--ink-2);
}
.title-note {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0 0 22px;
}
.title-sound {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  color: var(--ink-2);
  margin-bottom: 18px;
  cursor: pointer;
}
.title-sound input {
  width: 18px;
  height: 18px;
  accent-color: #e9c27a;
}
@keyframes breathe {
  50% {
    opacity: 0.82;
    text-shadow: 0 0 60px rgb(255 220 170 / 0.4);
  }
}
.btn {
  display: block;
  margin: 0 auto;
  font-family: var(--serif);
  font-weight: 300;
  font-size: 1.15rem;
  letter-spacing: 0.1em;
  color: var(--ink);
  background: #ffffff0f;
  border: 1px solid rgb(255 236 190 / 0.45);
  border-radius: 999px;
  padding: 10px 34px;
  cursor: pointer;
  transition:
    background 0.4s,
    box-shadow 0.4s;
}
.btn:hover,
.btn:focus-visible {
  background: #ffecbe24;
  box-shadow: 0 0 24px #ffdc9659;
  outline: none;
}
.btn.ghost {
  border-color: #fff3;
  font-size: 1rem;
}
.line {
  position: fixed;
  left: 50%;
  bottom: 17vh;
  transform: translate(-50%);
  width: min(92vw, 760px);
  margin: 0;
  text-align: center;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  line-height: 1.5;
  letter-spacing: 0.01em;
  text-shadow:
    0 1px 3px rgb(0 0 0 / 0.65),
    0 0 24px rgb(0 0 0 / 0.45);
  opacity: 0;
  transition:
    opacity 0.9s ease,
    transform 0.9s ease;
  pointer-events: none;
  z-index: 3;
}
.line.on {
  opacity: 1;
}
.line:before {
  content: "";
  position: absolute;
  inset: -0.9em -1.6em;
  z-index: -1;
  background: radial-gradient(ellipse closest-side, rgb(6 8 22 / 0.32), rgb(6 8 22 / 0.12) 60%, transparent);
}
.line .ch {
  display: inline;
  animation: ink 0.55s ease-out both;
}
@keyframes ink {
  0% {
    opacity: 0;
  }
  40% {
    opacity: 0.35;
  }
}
.caption {
  position: fixed;
  left: 50%;
  bottom: calc(17vh - 2.6em);
  transform: translate(-50%);
  width: min(92vw, 640px);
  margin: 0;
  text-align: center;
  font-size: 1rem;
  font-style: italic;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-shadow:
    0 1px 3px rgb(0 0 0 / 0.8),
    0 0 18px rgb(0 0 0 / 0.5);
  opacity: 0;
  transition: opacity 0.6s;
  pointer-events: none;
  z-index: 3;
}
.caption.on {
  opacity: 1;
}
.caption.quiet.on {
  opacity: 0.5;
  font-size: 0.92rem;
}
.spots {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.spot {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 50%;
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  padding: 0;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
#world {
  transition: none; /* colour is eased frame by frame in the game */
}
.spot:focus-visible {
  outline: 2px solid var(--glow);
  outline-offset: 2px;
  box-shadow: 0 0 20px #ffe3a699;
}
.words {
  position: fixed;
  inset: 10vh 6vw auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4vh 6vw;
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity 1.2s;
}
.words.on {
  opacity: 1;
  pointer-events: auto;
}
.words button {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(1.25rem, 3.6vw, 1.85rem);
  color: var(--ink);
  background: none;
  border: 0;
  padding: 6px 10px;
  cursor: pointer;
  letter-spacing: 0.04em;
  text-shadow: 0 0 18px rgb(255 236 190 / 0.55);
  animation: wordin 1.4s ease-out both;
  animation-delay: calc(var(--i) * 0.35s);
  transition:
    opacity 0.9s,
    transform 0.9s,
    text-shadow 0.6s;
}
.words.gifts button {
  font-style: normal;
  font-size: clamp(1rem, 2.7vw, 1.35rem);
}
.words button:hover,
.words button:focus-visible {
  text-shadow: 0 0 26px rgb(255 226 160 / 0.95);
  outline: none;
  transform: scale(1.06);
}
.words button.chosen {
  transform: scale(1.18);
  text-shadow:
    0 0 34px #ffd98a,
    0 0 4px #fff;
}
.words button.gone {
  opacity: 0;
}
@keyframes wordin {
  0% {
    opacity: 0;
    transform: translateY(8px);
    filter: blur(3px);
  }
}
.end {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  display: none;
  padding: 5vh 16px 8vh;
  background: linear-gradient(#06081a8c, #06081acc);
  z-index: 6;
}
.end.on {
  display: block;
  animation: endin 3s ease both;
}
@keyframes endin {
  0% {
    opacity: 0;
  }
}
.end-card {
  max-width: 620px;
  margin: 0 auto;
  text-align: center;
}
#sky {
  width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 10px 40px #00000073;
  margin-bottom: 22px;
}
.end-eyebrow {
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink-2);
  margin: 0;
}
.end-title {
  font-weight: 600;
  font-size: clamp(2.6rem, 9vw, 3.8rem);
  margin: 4px 0 18px;
  letter-spacing: 0.02em;
  text-shadow: 0 0 30px rgb(255 220 160 / 0.3);
  outline: none;
}
.end-line {
  font-size: 1.28rem;
  line-height: 1.55;
  margin: 0 0 12px;
  animation: lineup 1.6s ease both;
  animation-delay: calc(1.2s + var(--i) * 0.9s);
}
@keyframes lineup {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
}
.end-quote {
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink-2);
  margin: 26px auto 10px;
  max-width: 520px;
}
.end-quote cite {
  display: block;
  font-style: normal;
  font-size: 1rem;
  margin-top: 6px;
  letter-spacing: 0.08em;
}
.end-last {
  font-size: 1.35rem;
  margin: 22px 0 26px;
}
.end-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.end-actions .btn {
  margin: 0;
}
.end-small {
  font-size: 0.95rem;
  color: var(--ink-2);
  margin-top: 20px;
}
.pause {
  position: fixed;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  background: #080a189e;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
.pause.on {
  opacity: 1;
  pointer-events: auto;
}
.pause-card {
  text-align: center;
  padding: 28px 24px;
  max-width: min(90vw, 420px);
}
.pause-card h2 {
  font-family: var(--serif);
  font-weight: 200;
  letter-spacing: 0.12em;
  font-size: clamp(2rem, 7vw, 2.8rem);
  margin: 0 0 6px;
  color: var(--ink);
  letter-spacing: 0.04em;
}
.pause-note {
  margin: 0 0 22px;
  color: var(--ink-2);
  font-style: italic;
}
.pause-row {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
}
.pause-row .btn {
  margin: 0;
  font-size: 0.95rem;
}
.toggles {
  position: fixed;
  top: max(12px, env(safe-area-inset-top));
  right: 12px;
  z-index: 4;
  display: flex;
  gap: 8px;
}
.mute {
  font-family: var(--serif);
  font-weight: 300;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  background: #00000040;
  border: 1px solid rgb(255 255 255 / 0.18);
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 1s;
}
body.playing .mute {
  opacity: 0.55;
}
.mute:hover,
.mute:focus-visible {
  opacity: 1;
  outline: none;
}
.walk-on {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 4;
  transform: translateY(-200%);
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
  background: #0009;
  border: 1px solid var(--glow);
  border-radius: 8px;
  padding: 6px 12px;
}
.walk-on:focus-visible {
  transform: none;
  outline: none;
}
@media (prefers-reduced-motion: reduce) {
  .title h1,
  .words button,
  .end.on,
  .end-line {
    animation: none;
  }
  .title,
  .line,
  .caption,
  .words {
    transition: none;
  }
}
.end-h {
  font-weight: 600;
  font-size: clamp(1.5rem, 5vw, 2rem);
  margin: 28px 0 6px;
  text-shadow: 0 0 24px rgb(255 220 160 / 0.3);
}
.end-sub {
  font-style: italic;
  color: var(--ink-2);
  font-size: 1.08rem;
  margin: 6px 0 12px;
}
.trail {
  list-style: none;
  padding: 0;
  margin: 0 auto 18px;
  max-width: 460px;
  display: grid;
  gap: 6px;
  text-align: left;
}
.trail li {
  display: grid;
  grid-template-columns: 34px auto 1fr;
  align-items: center;
  gap: 10px;
  opacity: calc(0.35 + var(--k) * 0.65);
  animation: lineup 1.2s ease both;
  animation-delay: calc(2s + var(--i) * 0.25s);
}
.trail li:first-child {
  font-size: 1.15em;
}
.trail svg {
  width: 30px;
  height: 30px;
  color: #fff3da;
}
.trail-v {
  font-weight: 600;
  font-size: 1.2rem;
}
.trail-o {
  font-style: italic;
  color: var(--ink-2);
  font-size: 0.98rem;
}
body.bare .mute {
  opacity: 0 !important;
  pointer-events: none;
}
.words.ask {
  inset: auto 6vw 16vh;
  justify-content: center;
}
.ask-form {
  width: min(92vw, 600px);
  text-align: center;
  padding: 34px 28px;
  background: radial-gradient(ellipse closest-side, rgb(12 14 34 / 0.62), rgb(12 14 34 / 0.38) 60%, transparent);
}
.ask-q {
  display: block;
  font-weight: 200;
  letter-spacing: 0.03em;
  font-size: clamp(1.8rem, 6.4vw, 2.7rem);
  margin-bottom: 14px;
  text-shadow: 0 0 30px rgb(255 226 170 / 0.45);
}
.ask-form textarea,
.ask-form input {
  width: 100%;
  box-sizing: border-box;
  font-family: var(--serif);
  font-weight: 300;
  font-size: 1.2rem;
  line-height: 1.4;
  color: var(--ink);
  background: #0c0e2273;
  border: 1px solid rgb(255 236 190 / 0.3);
  border-radius: 12px;
  padding: 12px 14px;
  resize: none;
  text-align: center;
  outline: none;
  transition:
    border-color 0.4s,
    box-shadow 0.4s;
}
.ask-form textarea:focus,
.ask-form input:focus {
  outline: none;
  border-color: #ffe2aab3;
  box-shadow: 0 0 24px #ffdc9633;
}
.ask-form textarea::placeholder,
.ask-form input::placeholder {
  color: #fdf6e373;
  font-style: italic;
}
.ask-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
}
.ask-actions .btn {
  margin: 0;
}
.end-card .end-line {
  font-size: clamp(1.05rem, 3vw, 1.25rem);
  line-height: 1.7;
  letter-spacing: 0.01em;
  margin: 0 0 16px;
  animation: lineup 2s ease both;
  animation-delay: calc(1.5s + var(--i, 0) * 1.6s);
}
.end-answer {
  margin: 6px auto 22px;
  max-width: 520px;
  font-size: clamp(1.4rem, 4.4vw, 1.9rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.35;
  text-shadow: 0 0 28px rgb(255 226 170 / 0.4);
  animation: lineup 2.4s ease both;
  animation-delay: calc(1.5s + var(--i, 0) * 1.6s);
}
.end-you {
  font-size: clamp(2.8rem, 11vw, 4.4rem);
  font-weight: 200;
  margin: 18px 0 28px;
  letter-spacing: 0.04em;
  outline: none;
  text-shadow: 0 0 50px rgb(255 220 160 / 0.55);
  animation: youin 4s ease both;
  animation-delay: calc(2s + var(--i, 0) * 1.6s);
}
@keyframes youin {
  0% {
    opacity: 0;
    letter-spacing: 0.4em;
    filter: blur(8px);
  }
}
.carried {
  margin: 0 auto 26px;
  max-width: 480px;
  text-align: left;
}
.carried summary {
  cursor: pointer;
  text-align: center;
  font-style: italic;
  color: var(--ink-2);
  font-size: 1.05rem;
  list-style: none;
}
.carried summary::-webkit-details-marker {
  display: none;
}
.carried summary:focus-visible {
  outline: 1px solid var(--glow);
  border-radius: 6px;
}
.carried .trail li {
  grid-template-columns: 30px 1fr;
  animation: none;
  opacity: 1;
}
.carried .trail-o {
  grid-column: 2;
}
@media (prefers-reduced-motion: reduce) {
  .end-card .end-line,
  .end-answer,
  .end-you,
  .line .ch {
    animation: none;
  }
}
.words.name {
  inset: auto 6vw 2vh;
}
.words.name .ask-q {
  font-size: clamp(1.4rem, 5vw, 2rem);
}
.names-sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.name-star {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, 24px);
  opacity: 0;
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: #fff6dc;
  text-shadow: 0 0 12px rgb(255 220 150 / 0.7);
  white-space: nowrap;
  transition:
    opacity 4s ease,
    transform 6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.name-star:before {
  content: "";
  display: block;
  width: 4px;
  height: 4px;
  margin: 0 auto 6px;
  border-radius: 50%;
  background: #fff6dc;
  box-shadow: 0 0 8px 2px rgb(255 220 150 / 0.8);
}
.name-star.on {
  opacity: 0.85;
  transform: translate(-50%, 0);
}
body.ended .names-sky,
body.ended .toggles {
  visibility: hidden;
}
@media (prefers-reduced-motion: reduce) {
  .name-star {
    transition: opacity 2s ease;
    transform: translate(-50%, 0);
  }
}
