@font-face {
  font-family: Explora;
  src: url("./assets/Explora-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night: #030204;
  --paper: #fff4f7;
  --rose: #f5cada;
  --muted: #bca6b2;
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; }
body { background: var(--night); color: var(--paper); }

#stage {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  touch-action: manipulation;
}

#particles, #advance { position: absolute; inset: 0; width: 100%; height: 100%; }
#particles { display: block; pointer-events: none; }
#advance {
  z-index: 2;
  appearance: none;
  margin: 0;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#advance:disabled { cursor: wait; }
#advance:focus-visible { outline: 1px solid var(--rose); outline-offset: -8px; }

#greeting {
  position: absolute;
  top: 36.6%;
  left: max(24px, 3.6vw);
  z-index: 1;
  pointer-events: none;
  font-family: Explora, cursive;
  font-size: clamp(45px, 5.05vw, 96px);
  -webkit-text-stroke: .022em;
}
#greeting h1, #greeting p { font-weight: 400; margin: 0; line-height: 1; }
#greeting h1 { font-size: 1em; white-space: nowrap; }
#greeting p { margin: .16em 0 0 .13em; color: var(--rose); font-size: .73em; }

#cue {
  position: absolute;
  z-index: 1;
  bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px));
  left: 0;
  right: 0;
  margin: 0;
  padding: 0 1rem;
  text-align: center;
  pointer-events: none;
  color: var(--muted);
  font: 12px/1.5 "PingFang SC", "Noto Sans CJK SC", sans-serif;
  letter-spacing: .15em;
  text-shadow: 0 1px 7px var(--night), 0 1px 7px var(--night);
}
#cue[hidden] { display: none; }
noscript { position: absolute; inset: auto 0 4rem; text-align: center; }

@media (max-aspect-ratio: 4/5) {
  #greeting {
    top: max(8.4%, calc(env(safe-area-inset-top) + 18px));
    left: 6.2%;
    font-size: clamp(39px, 15.7vw, 76px);
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (min-aspect-ratio: 1/1) {
  #cue { left: max(24px, 3.6vw); right: auto; padding: 0; text-align: left; }
}
