:root {
  --ink: rgba(255, 236, 214, 0.86);
  --dim: rgba(255, 236, 214, 0.42);
  --line: rgba(255, 236, 214, 0.16);
  --accent: #ffb070;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: #000;
  overflow: hidden;
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  -webkit-font-smoothing: antialiased;
}

canvas#c {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  display: block;
  cursor: grab;
  touch-action: none;
}
canvas#c:active { cursor: grabbing; }

#veil {
  position: fixed;
  inset: 0;
  background: #000;
  pointer-events: none;
  opacity: 1;
  transition: opacity 2.4s cubic-bezier(.2, .6, .2, 1);
}
#veil.open { opacity: 0; }
#veil.closing { transition-duration: .9s; opacity: 1; }

#plate {
  position: fixed;
  left: max(28px, env(safe-area-inset-left));
  bottom: max(28px, env(safe-area-inset-bottom));
  max-width: 380px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 2s ease 1.2s, transform 2s ease 1.2s;
}
#plate.show { opacity: 1; transform: none; }

.kicker {
  font: 500 10px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--dim);
}

#plate h1 {
  margin: 10px 0 14px;
  font-weight: 400;
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: .02em;
  line-height: 1.05;
  color: var(--ink);
  text-shadow: 0 0 24px color-mix(in srgb, var(--accent) 45%, transparent);
}

#plate dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 5px 16px;
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font: 400 11px/1.35 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: .06em;
}
#plate dt { color: var(--dim); text-transform: uppercase; letter-spacing: .18em; font-size: 9.5px; padding-top: 1px; }
#plate dd { margin: 0; color: var(--ink); }

#hint {
  position: fixed;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 1.6s ease 2.4s;
}
#hint.show { opacity: .55; }
#hint.show:hover, #hint.show:focus-within { opacity: 1; transition-delay: 0s; transition-duration: .3s; }

#hint button {
  appearance: none;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--ink);
  padding: 7px 12px;
  font: 400 10.5px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: .2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .3s, background .3s;
}
#hint button:hover, #hint button:focus-visible {
  border-color: var(--line);
  background: rgba(0, 0, 0, .35);
  outline: none;
}

body.quiet #plate, body.quiet #hint { opacity: 0 !important; transition-delay: 0s; }
body.quiet #hint:hover { opacity: .5 !important; }

.nojs, .err {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  font-style: italic;
  color: var(--dim);
  text-align: center;
  padding: 2em;
}

@media (max-width: 640px) {
  #plate { left: 18px; bottom: 74px; max-width: 70vw; }
  #plate dl { font-size: 10px; }
  #hint { left: 10px; right: 10px; justify-content: center; flex-wrap: wrap; }
  #hint button { padding: 8px 9px; letter-spacing: .12em; }
}
