:root {
  color-scheme: dark;
  --paper: #171314;
  --ink: #f1e8df;
  --muted: #b4a69a;
  --red: #ff8a91;
  --line: #514840;
  --panel: #100e0f;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: #090809;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

.shell {
  width: min(940px, calc(100% - 32px));
  min-height: 100vh;
  margin: auto;
  padding: 0 48px 60px;
  background: var(--paper);
  box-shadow: 0 0 80px #000;
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

a {
  color: inherit;
}

.brand {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .03em;
  text-decoration: none;
}

.back {
  color: var(--muted);
  font-size: 11px;
  text-decoration: none;
  text-transform: uppercase;
}

main {
  padding: 48px 0 0;
}

.eyebrow {
  margin: 0 0 15px;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.5rem, 7vw, 4.8rem);
  letter-spacing: -.07em;
  line-height: .9;
}

.intro {
  max-width: 690px;
  margin: 19px 0 23px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.protocol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin: 16px 0 23px;
  color: #ffc9cd;
  font-size: 11px;
}

.frame {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-right: 0;
  background: var(--panel);
}

.frame:last-child {
  border-right: 1px solid var(--line);
}

.arrow {
  padding: 0 8px;
  color: var(--red);
  font-size: 1rem;
}

.room {
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
}

.room-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.room-head b,
.status {
  font-size: 11px;
}

.status-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.cancel-work {
  padding: 4px 6px;
  font-size: 9px;
  text-transform: uppercase;
}

.status {
  color: #ffc7cb;
  letter-spacing: .07em;
}

.status::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 7px;
  border-radius: 50%;
  background: #a78b92;
  content: "";
}

.status.online::before {
  background: #ff626c;
}

.messages {
  display: grid;
  align-content: start;
  min-height: 270px;
  height: min(48vh, 430px);
  gap: 8px;
  overflow: auto;
  padding: 14px;
}

.empty {
  max-width: 380px;
  margin: auto;
  color: #b99ba0;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
}

.message {
  padding: 8px 10px;
  border-left: 1px solid var(--red);
  background: var(--paper);
}

.message-top {
  display: flex;
  gap: 10px;
  color: #ffb3ba;
  font-size: 11px;
}

.message time {
  color: #a98b8f;
}

.message p {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.composer {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 7px;
  padding: 12px;
  border-top: 1px solid var(--line);
}

input,
button {
  min-width: 0;
  border-radius: 0;
  font-family: inherit;
  font-size: 12px;
}

input {
  width: 100%;
  padding: 9px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #090809;
}

button {
  padding: 9px 11px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #251819;
  cursor: pointer;
  font-weight: 800;
}

button:hover {
  color: var(--red);
  border-color: var(--red);
}

button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.note {
  margin: 14px 0 0;
  color: #a98b8f;
  font-size: 11px;
  line-height: 1.6;
}

code {
  color: var(--red);
}

@media (max-width: 650px) {
  .shell {
    width: 100%;
    padding: 0 17px 45px;
  }

  nav {
    align-items: flex-start;
    padding: 20px 0;
    flex-wrap: wrap;
  }

  main {
    padding-top: 28px;
  }

  .composer {
    grid-template-columns: 1fr;
  }

  .composer button {
    width: 100%;
  }
}
