@font-face {
  font-family: "X VF";
  src: url("/fonts/X-VF.ttf") format("truetype");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #ffffff;
  --dove: hsl(222 19% 86%);
  --fog: hsl(216 4% 51%);
  --jet: hsl(0 0% 4%);
  --charcoal: hsl(0 0% 10%);
  --paper: rgb(26 26 26 / 92%);
  --frame-w: 1920px;
  --frame-h: 1080px;
  --preview-scale: 1;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: var(--frame-w);
  height: var(--frame-h);
  background: none;
  background-color: rgba(0, 0, 0, 0);
  overflow: hidden;
}

body {
  font-family: "X VF", system-ui, sans-serif;
  font-optical-sizing: auto;
  font-weight: 500;
  color: var(--ink);
}

html.preview,
html.preview body {
  width: 100%;
  height: 100%;
  background-color: var(--jet);
}

html.preview body {
  position: relative;
}

.frame {
  position: relative;
  width: var(--frame-w);
  height: var(--frame-h);
  overflow: hidden;
  background: none;
  background-color: rgba(0, 0, 0, 0);
}

html.preview .frame {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(var(--preview-scale));
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 12%);
}

.stage {
  position: absolute;
  left: 40px;
  top: 538px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 480px;
  max-height: var(--box-h, 360px);
  margin: 0;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--paper);
  overflow: hidden;
  isolation: isolate;
  contain: paint;
}

.stage:not(:has(.item)) {
  padding: 0;
  background: none;
  background-color: rgba(0, 0, 0, 0);
}

html.preview .stage:not(:has(.item)) {
  padding: 14px 16px;
  background: var(--paper);
}

.messages {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  width: 100%;
  max-height: calc(var(--box-h, 360px) - 28px);
  margin: 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
}

.item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 2px 4px;
  background: none;
  animation: rise 220ms ease-out;
}

.face,
.mark {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.face {
  object-fit: cover;
}

.mark {
  display: grid;
  place-items: center;
  background: var(--charcoal);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.copy {
  min-width: 0;
}

.name {
  margin: 0 0 2px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
}

.handle {
  color: var(--fog);
  font-weight: 400;
}

.text {
  margin: 0;
  color: var(--dove);
  font-size: 18px;
  font-weight: 400;
  line-height: 28px;
  overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
  .item {
    animation: none;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
