:root {
  --bg: #000;
  --ink: #fdf1e1;            /* warm cream — the one neutral family */
  --ink-60: rgb(253 241 225 / 0.6);
  --ink-45: rgb(253 241 225 / 0.45);
  --serif: "EB Garamond", "Iowan Old Style", Georgia, serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

main {
  position: fixed;
  inset: 0;
  height: 100svh;
  height: 100dvh;
}

#stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  opacity: 0;
  transition: opacity 1.2s var(--ease-out);
}
#stage.is-ready { opacity: 1; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---- quiet hints ---- */
.hint {
  position: absolute;
  left: 50%;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--ink-60);
  transform: translateX(-50%);
  pointer-events: none;
  white-space: nowrap;
}

.hint--start {
  inset: 0;
  transform: none;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  animation: fade-in 1.6s var(--ease-out) 0.6s forwards;
  transition: opacity 0.9s var(--ease-out);
}
.hint--start span { animation: breathe 3.2s ease-in-out 2.2s infinite; }
.hint--start:focus-visible { outline: none; }
.hint--start:focus-visible span { outline: 1px solid var(--ink-45); outline-offset: 10px; border-radius: 999px; }
.hint--start.is-gone { opacity: 0 !important; pointer-events: none; animation: none; }

.hint--drag {
  bottom: calc(env(safe-area-inset-bottom, 0px) + 34px);
  font-size: 17px;
  color: var(--ink-45);
  opacity: 0;
  transition: opacity 1.4s var(--ease-out);
}
.hint--drag.is-on { opacity: 1; }

/* ---- the line ---- */
.love {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 9.5svh);
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(24px, 7.4vw, 32px);
  letter-spacing: 0.01em;
  line-height: 1;
  color: var(--ink);
  text-shadow: 0 0 18px rgb(224 53 79 / 0.35), 0 0 2px rgb(253 241 225 / 0.25);
  white-space: pre;
  pointer-events: none;
}
.love span {
  display: inline-block;
  opacity: 0;
  filter: blur(8px);
  transform: translateY(0.25em);
  transition:
    opacity 1.4s var(--ease-out),
    filter 1.6s var(--ease-out),
    transform 1.6s var(--ease-out);
  transition-delay: calc(var(--i) * 70ms);
}
.love.is-on span { opacity: 0.94; filter: blur(0); transform: none; }

.fallback[hidden] { display: none; }
.fallback {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-family: var(--serif); font-style: italic; font-size: 40px;
  color: #f4a6c0;
}

@keyframes fade-in { to { opacity: 1; } }
@keyframes breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
  .hint--start, .hint--start span { animation: none; opacity: 1; }
  #stage, .hint--drag, .love span { transition: none; }
}
