:root {
  --ink: #f3efe8;
  --ink-dim: rgba(243, 239, 232, 0.62);
  --accent: #ff7a1a;
  --night: #05070f;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--night);
  color: var(--ink);
  font-family: "Barlow", ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}

.stage.is-dragging { cursor: grabbing; }

.plate {
  position: fixed;
  top: max(22px, env(safe-area-inset-top, 0px) + 16px);
  left: max(22px, env(safe-area-inset-left, 0px) + 16px);
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1.1s ease 0.15s, transform 1.1s ease 0.15s;
}

.plate.is-in { opacity: 1; transform: none; }

.plate__eyebrow {
  margin: 0 0 8px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.plate__title {
  margin: 0;
  font-family: "Barlow Condensed", "Barlow", sans-serif;
  font-weight: 800;
  font-size: clamp(44px, 7.2vw, 92px);
  line-height: 0.92;
  letter-spacing: 0.005em;
  text-transform: none;
  text-shadow: 0 2px 26px rgba(0, 0, 0, 0.55);
}

.plate__line {
  margin: 14px 0 0;
  max-width: 34ch;
  font-size: clamp(13px, 1.5vw, 15px);
  font-weight: 500;
  letter-spacing: 0.015em;
  color: var(--ink-dim);
}

.hint {
  position: fixed;
  right: max(22px, env(safe-area-inset-right, 0px) + 16px);
  bottom: max(96px, env(safe-area-inset-bottom, 0px) + 92px);
  z-index: 4;
  margin: 0;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.hint.is-in { opacity: 0.85; }
.hint.is-out { opacity: 0; }

.veil {
  position: fixed;
  inset: 0;
  z-index: 8;
  display: grid;
  place-content: center;
  gap: 14px;
  background: var(--night);
  transition: opacity 0.8s ease;
}

.veil.is-done { opacity: 0; pointer-events: none; }

.veil__mark {
  margin: 0;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.34em;
  color: var(--ink-dim);
  text-align: center;
}

.veil__bar {
  width: 168px;
  height: 2px;
  margin: 0 auto;
  background: rgba(243, 239, 232, 0.14);
  overflow: hidden;
}

.veil__fill {
  display: block;
  width: 30%;
  height: 100%;
  background: var(--accent);
  transition: width 0.4s ease;
}

.fallback {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 9;
  margin: 0;
  padding: 0 24px;
  text-align: center;
  color: var(--ink-dim);
}

@media (max-width: 700px) {
  .plate__line { max-width: 26ch; }
  .hint { display: none; }
}
