:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  background: #080913;
  color: #fff8f1;
}
* { box-sizing: border-box; }
body { margin: 0; }
.void {
  isolation: isolate;
  position: relative;
  min-height: 100svh;
  height: 100dvh;
  overflow: clip;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #080913;
}
.void__video, .void__shade, .void__flight {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.void__video { object-fit: cover; z-index: -3; }
.void__shade {
  z-index: -2;
  background:
    linear-gradient(180deg, rgb(7 8 17 / .78), transparent 24%),
    linear-gradient(0deg, rgb(7 8 17 / .94), transparent 35%);
}
.void__flight {
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}
.void__header {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.void__heading, .void__header > h1 {
  position: absolute;
  top: max(24px, env(safe-area-inset-top));
  left: 4%;
  width: max-content;
  max-width: calc(100% - 88px);
  margin: 0;
  font: 400 clamp(1.65rem, 3.2vw, 2.5rem)/1.15 Georgia, serif;
  letter-spacing: .02em;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 18px #080913;
  pointer-events: none;
}
.void__header > .void__heading {
  top: max(var(--heading-y), env(safe-area-inset-top));
  left: var(--heading-x);
  font-family: var(--heading-font);
  font-size: var(--heading-size);
  text-align: var(--heading-anchor);
  transform: translateX(var(--heading-shift));
}
button { font: inherit; }
button:focus-visible, textarea:focus-visible {
  outline: 2px solid #ffd7a9;
  outline-offset: 4px;
}
.void__motion {
  position: absolute;
  z-index: 1;
  pointer-events: auto;
  top: max(20px, env(safe-area-inset-top));
  right: clamp(18px, 4vw, 56px);
  width: 44px;
  height: 44px;
  border: 1px solid #fbdbc665;
  border-radius: 50%;
  background: #111320b8;
  color: #fff5e8;
  cursor: pointer;
}
.void__motion span { display: inline-block; font-size: 1rem; }
.void__composer {
  grid-row: 3;
  display: flex;
  align-items: end;
  gap: 12px;
  width: min(var(--composer-width, 780px), calc(100% - 32px));
  justify-self: var(--composer-align, center);
  margin: 0 16px max(var(--composer-inset, 24px), env(safe-area-inset-bottom));
  padding: 8px;
  border: 1px solid #ead0b460;
  border-radius: 20px;
  background: #131421e8;
  box-shadow: 0 8px 36px #05050ac7, inset 0 1px 0 #ffffff10;
}
.void__composer:focus-within { border-color: #e5ac7c; }
textarea {
  flex: 1;
  min-width: 0;
  padding: 10px 9px;
  border: 0;
  border-radius: 10px;
  resize: none;
  min-height: 44px;
  max-height: min(36dvh, 220px);
  overflow-y: auto;
  background: transparent;
  color: #fff7ec;
  font: 400 var(--composer-font-size, 1.25rem)/1.4 var(--composer-font, system-ui, sans-serif);
  white-space: pre-wrap;
  overflow-wrap: break-word;
}
textarea::placeholder { color: #d1c3cc; opacity: 1; }
textarea:focus-visible { outline-offset: -2px; }
.void__send {
  min-height: 44px;
  min-width: 79px;
  border: 0;
  border-radius: 12px;
  padding: 0 17px;
  background: #ffc58e;
  color: #29180d;
  font-size: var(--send-font-size, 1.0625rem);
  font-weight: 680;
  cursor: pointer;
}
.void__send:enabled:hover { background: #ffdbb6; }
.void__send:disabled { color: #d1b8a3; background: #4b382e; cursor: default; }
.void__letter {
  position: absolute;
  top: 0;
  left: 0;
  color: #fff4e1;
  text-shadow: 0 0 5px #fff1c9, 0 0 14px #f59542, 0 0 23px #ef713d;
  white-space: pre;
  will-change: transform, opacity;
}
.void__flash {
  position: absolute;
  width: 86px;
  height: 86px;
  margin: -43px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffe1b7a6 0%, #ff974d66 24%, transparent 66%);
  mix-blend-mode: screen;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
@media (max-width: 420px) {
  .void__composer { gap: 4px; }
  .void__send { min-width: 65px; padding-inline: 10px; }
}

.void--editing .void__heading {
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
  user-select: none;
}
.void--editing .void__heading[data-selected="true"] {
  outline: 1px dashed #ffc58e;
  outline-offset: 5px;
}
.void--editing .void__heading:active { cursor: grabbing; }
