:root {
  --bg: #050407;
  --fg: #e8e2dc;
  --dim: #6b6560;
  --red: #ff1c0b;
  --blue: #3caee3;
  --turq: #6ddbd7;
  --gutter: clamp(16px, 3vw, 36px);
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  overflow: hidden;
  font: 400 12px/1.6 "IBM Plex Mono", ui-monospace, Menlo, monospace;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  -webkit-font-smoothing: antialiased;
}

canvas#gl {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  display: block;
}

.fallback {
  display: none;
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(80vw, 760px);
}

.no-gl .fallback { display: block; }

.hud {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--gutter) + env(safe-area-inset-top)) var(--gutter) calc(var(--gutter) + env(safe-area-inset-bottom));
  pointer-events: none;
  mix-blend-mode: difference;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}

.row.top { align-items: flex-start; }

.cell { display: flex; flex-direction: column; gap: 2px; }
.cell.right { align-items: flex-end; text-align: right; }
.top .cell { flex-direction: row; gap: 10px; flex-wrap: wrap; }
.top .cell.right { justify-content: flex-end; }

.label { font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase; }
.dim { color: var(--dim); }

.whisper {
  min-height: 1.6em;
  max-width: 34ch;
  font-size: 13px;
  text-transform: none;
}

button, input {
  pointer-events: auto;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  background: none;
  border: 0;
  text-transform: inherit;
}

button {
  cursor: pointer;
  padding: 4px 0;
}

button:hover, button:focus-visible { color: var(--turq); outline: none; }
button[aria-pressed="true"] { color: var(--red); }

.artist { color: var(--dim); }

.answer { min-height: 1.6em; color: var(--turq); }

.gated .hud { visibility: hidden; }

.gate {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: safe center;
  padding: calc(var(--gutter) + env(safe-area-inset-top)) var(--gutter) calc(var(--gutter) + env(safe-area-inset-bottom));
  background: rgba(5, 4, 7, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.gate[hidden] { display: none; }

.guest {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.guest h1 { font-size: 13px; }

.guest p { text-transform: none; }

.guest label { display: flex; flex-direction: column; gap: 4px; }

.guest input:not([type="checkbox"]) {
  width: 100%;
  font-size: 16px;
  text-transform: none;
  border-bottom: 1px solid var(--dim);
  padding: 6px 0;
  caret-color: var(--red);
  outline: none;
  border-radius: 0;
}

.guest input::placeholder { color: var(--dim); opacity: 0.6; }

.guest input:focus { border-color: var(--fg); }

.guest .consent { flex-direction: row; align-items: flex-start; gap: 10px; text-transform: none; cursor: pointer; }

.guest input[type="checkbox"] {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--red);
  appearance: auto;
}

.guest button {
  align-self: flex-start;
  font-size: 14px;
  color: var(--red);
}

.guest button:disabled { opacity: 0.5; cursor: wait; }

.shake { animation: shake 0.28s steps(4) 1; }

@keyframes shake {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-4px, 1px); }
  50% { transform: translate(3px, -1px); }
  75% { transform: translate(-2px, 0); }
  100% { transform: translate(0, 0); }
}

@media (max-width: 560px) {
  html, body { font-size: 11px; }
  .row.bottom { flex-direction: column; align-items: stretch; gap: 14px; }
  .row.bottom .cell.right { align-items: flex-start; text-align: left; }
}
