:root {
  color-scheme: dark;
  background: #0c0a10;
  color: #f3eae9;
  font-family: "Songti SC", "Noto Serif CJK SC", "SimSun", serif;
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body { margin: 0; }

main {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  isolation: isolate;
  min-height: max(690px, 100svh);
  padding: 3rem 1.5rem 1.6rem;
  background: radial-gradient(ellipse at 50% 42%, #1d1320 0%, #100d15 36%, #0c0a10 70%);
}

.signature {
  position: absolute;
  z-index: 1;
  top: clamp(2.2rem, 9svh, 6rem);
  inset-inline: 1.5rem;
  text-align: center;
}

h1 {
  margin: 0;
  font: 400 clamp(1.45rem, 3.25vw, 3.1rem)/1.05 Georgia, serif;
  letter-spacing: -.055em;
}

h1 em { font-weight: 400; color: #ddc5cb; }

#presence {
  position: absolute;
  z-index: -1;
  inset: 0 0 auto;
  width: 100%;
  height: clamp(480px, 83svh, 960px);
  pointer-events: none;
}

.dialogue {
  width: min(100%, 36rem);
  text-align: center;
}

#voice {
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

.message {
  margin: 0;
  font-size: clamp(1.12rem, 2.05vw, 1.65rem);
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: .035em;
  text-wrap: pretty;
  overflow-wrap: anywhere;
  animation: arrive 1.5s ease both;
}

.human {
  color: #b99aa9;
  font-size: 1rem;
  margin: 0;
  overflow-wrap: anywhere;
}

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

#reply {
  max-width: 24rem;
  margin: 1.05rem auto 0;
  animation: arrive 900ms ease both;
}

.reply-line {
  display: flex;
  align-items: center;
  gap: .35rem;
  border-bottom: 1px solid #846876;
}

.reply-line:focus-within { border-color: #eed0dc; }

input, button {
  color: inherit;
  background: transparent;
  font: inherit;
}

input {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: .7rem .2rem;
  font-family: system-ui, sans-serif;
  font-size: 1rem;
}

input::placeholder { color: #bd9faa; opacity: 1; }
input:focus { outline: none; }

button {
  min-height: 2.75rem;
  cursor: pointer;
  border: 0;
}

.send {
  min-width: 2.75rem;
  font: 400 1.35rem/1 system-ui, sans-serif;
}

button:disabled { opacity: .44; cursor: default; }

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #b598a6;
  font: 400 .75rem/1.4 system-ui, sans-serif;
}

.text-button {
  padding: .3rem .125rem;
  color: #cfb3be;
  font: 400 .78rem/1.4 system-ui, sans-serif;
}

.text-button:hover, footer a:hover { color: #fff3f4; }

#notice {
  color: #dfacbd;
  margin: 0 0 .45rem;
  font: 400 .82rem/1.4 system-ui, sans-serif;
}

footer { margin-top: clamp(1.35rem, 4svh, 3.25rem); }

footer a {
  display: inline-block;
  padding: .5rem;
  color: #bda4ad;
  font: 400 .8rem/1 Georgia, serif;
  text-decoration: none;
}

:focus-visible { outline: 1px solid #f0c0d2; outline-offset: 3px; }

@media (max-width: 570px) {
  main { min-height: max(635px, 100svh); padding-inline: 1.25rem; }
  #presence { height: clamp(470px, 74svh, 650px); }
  .dialogue { max-width: 30rem; }
  #reply { margin-top: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
}
