:root {
  color-scheme: dark;
  font-family: system-ui, sans-serif;
  background: #100a17;
  color: #f6edf9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 2rem 1rem;
  background:
    radial-gradient(ellipse at top, #3e1f4d 0, transparent 55%),
    #100a17;
}

.shell {
  width: min(100%, 900px);
  margin: 0 auto;
  border: 1px solid #63426b;
  border-radius: 1rem;
  background: rgb(22 15 30 / 94%);
  box-shadow: 0 1rem 4rem rgb(0 0 0 / 35%);
  overflow: hidden;
}

.header {
  padding: 1.5rem 1.75rem 1rem;
  border-bottom: 1px solid #38283f;
}

.eyebrow {
  margin: 0;
  color: #d89bec;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

h1 {
  margin: 0.35rem 0;
  font-size: clamp(1.5rem, 5vw, 2.2rem);
}

.status {
  margin: 0;
  color: #cbb8d1;
  font-size: 0.9rem;
}

.output {
  height: min(65vh, 680px);
  min-height: 340px;
  overflow-y: auto;
  padding: 1rem 1.75rem;
  line-height: 1.55;
  overscroll-behavior: contain;
}

.message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 0.35rem 0;
}

.dialogue strong {
  color: #c57dde;
}

.speaker-sanemi strong {
  color: #75cf8e;
}

.speaker-tanjiro strong {
  color: #f07171;
}

.speaker-nezuko strong {
  color: #f19bd2;
}

.speaker-zenitsu strong {
  color: #f2cf66;
}

.speaker-inosuke strong {
  color: #76cfd0;
}

.player-message {
  color: #b6e4ff;
  white-space: pre-wrap;
}

.prompt-message {
  color: #e6c6ef;
  margin-top: 1rem;
}

.answer-form {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.75rem;
  border-top: 1px solid #38283f;
}

.answer-form input {
  flex: 1;
  min-width: 0;
  border: 1px solid #765180;
  border-radius: 0.5rem;
  background: #0e0913;
  color: inherit;
  font: inherit;
  padding: 0.75rem 0.9rem;
}

.answer-form input:focus-visible,
.answer-form button:focus-visible {
  outline: 2px solid #d89bec;
  outline-offset: 2px;
}

.answer-form input:disabled {
  opacity: 0.55;
}

.answer-form button {
  border: 0;
  border-radius: 0.5rem;
  background: #995bb0;
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 0.75rem 1.2rem;
  cursor: pointer;
}

.answer-form button:hover {
  background: #b373c9;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0 1.75rem 1rem;
  color: #a692af;
  font-size: 0.8rem;
}

.import-save {
  color: #d89bec;
  cursor: pointer;
}

.import-save input {
  max-width: 13rem;
  color: #cbb8d1;
  font: inherit;
}

.import-save input:disabled {
  cursor: not-allowed;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
