:root {
  color-scheme: dark;
  --bg: #111514;
  --panel: #151918;
  --line: #2a302d;
  --muted: #88958e;
  --text: #d4dcd5;
  --green: #b0ef88;
  --purple: #b1a3df;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 var(--mono);
}
button,
input {
  font: inherit;
}
button,
a,
input {
  outline-offset: 4px;
}
button {
  color: inherit;
  background: none;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  padding: 7px 12px;
}
button:hover {
  background: #273128;
  color: var(--green);
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--green);
}
a {
  color: var(--green);
}
.app {
  height: 100dvh;
  min-height: 480px;
  display: flex;
  flex-direction: column;
}
header {
  height: 81px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #edf5ed;
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -1.5px;
}
.brand > span:not(.brand-icon) {
  color: var(--green);
}
.brand-icon {
  display: grid;
  place-items: center;
  color: var(--green);
  font-size: 30px;
  background: #253522;
  width: 39px;
  height: 39px;
  border: 1px solid #43603b;
  border-radius: 7px;
  margin-right: 12px;
}
.brand sup {
  letter-spacing: 1.5px;
  font-size: 10px;
  color: var(--muted);
  margin: 9px 0 0 20px;
  font-weight: 400;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 22px;
}
.status {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--muted);
}
.status.live {
  color: var(--green);
}
.status.live:before {
  content: "●";
  font-size: 10px;
  margin-right: 8px;
}
.header-right button {
  background: var(--green);
  border: 0;
  color: #182115;
  font-weight: 700;
  padding: 8px 15px;
}
.workspace {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr) 208px;
  flex: 1;
  min-height: 0;
}
.channels {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 26px 14px 20px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
}
.network {
  padding: 0 12px 24px;
  display: flex;
  flex-direction: column;
}
.eyebrow,
.section-label,
.members-title {
  font-size: 11px;
  letter-spacing: 1.6px;
  color: var(--muted);
}
.network strong {
  margin-top: 8px;
  font-size: 16px;
  font-weight: 500;
}
.network .muted {
  font-size: 12px;
}
.muted {
  color: var(--muted);
}
.server-tab,
.channel-item {
  border: 0;
  text-align: left;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 3px;
  padding: 9px 12px;
}
.server-tab > span:first-child {
  font-size: 19px;
  color: var(--muted);
}
.active {
  background: #263225 !important;
  color: var(--green) !important;
  box-shadow: inset 2px 0 var(--green);
}
.small-tag {
  font-size: 9px;
  margin-left: auto;
  letter-spacing: 1px;
  color: var(--muted);
}
.section-label {
  margin: 26px 12px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-label button {
  border: 0;
  padding: 0 3px;
  font-size: 21px;
  line-height: 1;
}
.subtle {
  font-size: 12px;
  text-align: left;
  color: var(--muted);
  border: 0;
  padding-left: 12px;
  margin-top: 5px;
}
.empty-dm {
  font-size: 12px;
  line-height: 1.9;
  color: #6f7d74;
  margin: 3px 12px;
}
.empty-dm code {
  color: #a5b29f;
}
.sidebar-bottom {
  margin-top: auto;
  padding: 32px 12px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  line-height: 1.8;
}
.mini-logo {
  font-size: 23px;
  color: var(--green);
}
main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.room-heading {
  height: 69px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  border-bottom: 1px solid var(--line);
}
.room-heading > div {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.room-heading strong {
  font-size: 17px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.room-type {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 1px;
  margin-left: 8px;
}
.room-heading button {
  font-size: 12px;
  border: 0;
  color: var(--muted);
}
#room-symbol {
  font-size: 24px;
  color: var(--green);
}
.topic {
  padding: 11px 26px;
  color: var(--muted);
  font-size: 12px;
  border-bottom: 1px solid #202823;
  overflow-wrap: anywhere;
}
.messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 26px;
  scrollbar-color: #354336 transparent;
}
.welcome {
  max-width: 600px;
  padding: 28px 8px 36px;
}
.welcome .eyebrow {
  font-size: 10px;
  color: var(--green);
  letter-spacing: 2px;
}
h1 {
  font-size: clamp(23px, 2.8vw, 39px);
  letter-spacing: -1.8px;
  line-height: 1.3;
  margin: 21px 0 16px;
  color: #e0e9df;
  font-weight: 500;
}
h1 span {
  color: var(--green);
}
.welcome p {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.9;
}
.welcome-rule {
  height: 1px;
  background: var(--line);
  margin: 30px 0 22px;
  max-width: 420px;
}
.welcome-command {
  display: flex;
  gap: 20px;
  margin: 9px 0;
  font-size: 12px;
}
.welcome-command code {
  color: var(--green);
  width: 160px;
  flex-shrink: 0;
}
.welcome-command span {
  color: var(--muted);
}
.welcome .welcome-note {
  font-size: 11px;
  margin-top: 28px;
  color: #69786d;
}
.composer-area {
  padding: 16px 24px 13px;
}
.composer {
  display: flex;
  align-items: center;
  border: 1px solid #44523c;
  border-radius: 6px;
  background: #191f19;
  padding: 12px 14px;
  gap: 13px;
}
.composer:focus-within {
  border-color: var(--green);
}
#composer-nick {
  color: var(--green);
  font-size: 12px;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prompt {
  color: #6d8a5c;
}
#message-form {
  display: flex;
  flex: 1;
  min-width: 0;
  gap: 4px;
}
input {
  width: 100%;
  min-width: 0;
  background: #111713;
  border: 1px solid #3e4b3e;
  border-radius: 4px;
  color: var(--text);
  padding: 10px 12px;
}
#message-input {
  padding: 0;
  border: 0;
  background: none;
  outline: 0;
  font-size: 14px;
}
input::placeholder {
  color: #788478;
}
#message-form button {
  padding: 0 3px;
  border: 0;
  color: var(--green);
  font-size: 20px;
  line-height: 1;
}
.composer-hints {
  display: flex;
  justify-content: space-between;
  color: #778274;
  font-size: 10px;
  padding: 8px 1px 0;
}
kbd {
  font: inherit;
  color: #a1ada0;
}
.hint-gap {
  margin-left: 15px;
}
.members {
  border-left: 1px solid var(--line);
  background: #131715;
  padding: 25px 18px;
  display: flex;
  flex-direction: column;
  overflow: auto;
}
.members-title {
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
#member-count {
  background: #263025;
  border-radius: 4px;
  min-width: 23px;
  text-align: center;
  color: var(--green);
  letter-spacing: 0;
}
.member-empty {
  margin-top: 28px;
  color: #758174;
  font-size: 12px;
  line-height: 1.9;
}
.member {
  display: block;
  border: 0;
  width: 100%;
  text-align: left;
  padding: 6px 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.member-role {
  display: inline-block;
  width: 21px;
  color: var(--green);
}
#member-list {
  margin-top: 18px;
}
.legend {
  margin-top: auto;
  color: #778273;
  font-size: 10px;
  line-height: 2;
}
.operator {
  color: var(--green);
  margin-right: 8px;
}
.voice {
  color: var(--purple);
  margin-right: 8px;
}
footer {
  min-height: 34px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  padding: 6px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: #8b9889;
  gap: 20px;
}
#footer-dot {
  color: var(--green);
}
#footer-center {
  color: #677462;
}
.line {
  display: grid;
  grid-template-columns: 47px 105px minmax(0, 1fr);
  gap: 12px;
  font-size: 16px;
  padding: 3px 0;
  overflow-wrap: anywhere;
}
.line time {
  color: #61715f;
  font-size: 11px;
  padding-top: 3px;
}
.line .sender {
  color: var(--purple);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.line.self .sender {
  color: var(--green);
}
.line.system {
  color: #8c9b85;
  font-size: 12px;
}
.line.system .sender {
  color: #687c61;
}
.line.action {
  color: #d5b783;
}
.line.error {
  color: #ee9e8f;
}
.unread {
  margin-left: auto;
  color: var(--green);
}
dialog {
  width: min(560px, calc(100% - 32px));
  max-height: 85dvh;
  background: #181e19;
  border: 1px solid #46513f;
  border-radius: 9px;
  color: var(--text);
  padding: 28px;
  box-shadow: 0 24px 100px #0008;
}
dialog::backdrop {
  background: #050b07ba;
  backdrop-filter: blur(4px);
}
.dialog-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-top button {
  border: 0;
  font-size: 24px;
  padding: 0 4px;
  line-height: 1;
}
h2 {
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.8px;
  margin: 22px 0 8px;
}
dialog p {
  color: var(--muted);
  font-size: 13px;
}
label {
  display: block;
  margin: 20px 0 7px;
  font-size: 12px;
}
button.primary {
  background: var(--green);
  color: #182215;
  border: 0;
  font-weight: 700;
  padding: 11px 17px;
}
#connect-form > .primary {
  width: 100%;
  margin-top: 12px;
}
.fineprint {
  font-size: 11px !important;
  line-height: 1.8;
}
.form-error {
  color: #efa48d;
}
.inline-form {
  display: flex;
  gap: 10px;
}
.inline-form button {
  flex-shrink: 0;
}
.help-row {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  font-size: 12px;
}
.help-row code {
  color: var(--green);
  display: block;
}
.help-row span {
  color: var(--muted);
}
.channel-result {
  width: 100%;
  text-align: left;
  margin: 6px 0;
}
.channel-result span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
#help-dialog > a {
  font-size: 12px;
}
.day-divider {
  color: #708169;
  font-size: 10px;
  text-align: center;
  padding: 15px 0;
}
@media (min-width: 1500px) {
  .workspace {
    grid-template-columns: 260px minmax(0, 1fr) 240px;
  }
  .welcome {
    padding-top: 55px;
  }
  .messages {
    padding-left: 34px;
  }
}
@media (max-width: 1050px) {
  .workspace {
    grid-template-columns: 205px minmax(0, 1fr);
  }
  .members {
    display: none;
  }
  .room-type {
    display: none;
  }
  .welcome-command {
    flex-wrap: wrap;
    gap: 3px;
  }
  .welcome-command code {
    width: 100%;
  }
  .brand sup {
    display: none;
  }
}
@media (max-width: 640px) {
  header {
    height: 65px;
    padding: 0 16px;
  }
  .brand {
    font-size: 24px;
  }
  .brand-icon {
    width: 32px;
    height: 32px;
    font-size: 25px;
  }
  .header-right {
    gap: 8px;
  }
  .status {
    font-size: 9px;
  }
  .header-right button {
    font-size: 11px;
  }
  .workspace {
    display: flex;
    flex-direction: column;
  }
  .channels {
    padding: 8px;
    flex-direction: row;
    gap: 5px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow-x: auto;
    flex-shrink: 0;
    min-height: 49px;
    align-items: center;
  }
  .network,
  .section-label,
  .empty-dm,
  .sidebar-bottom,
  .dm-label {
    display: none;
  }
  .server-tab,
  .channel-item {
    width: auto;
    white-space: nowrap;
    margin: 0;
    padding: 5px 10px;
    font-size: 12px;
  }
  .small-tag {
    display: none;
  }
  #channel-list,
  #dm-list {
    display: flex;
    gap: 4px;
  }
  .subtle {
    white-space: nowrap;
    padding: 5px;
    font-size: 11px;
    margin: 0;
  }
  .channels .server-tab > span:first-child {
    display: none;
  }
  main {
    flex: 1;
  }
  .room-heading {
    height: 54px;
    padding: 0 16px;
  }
  .topic {
    padding: 8px 16px;
    font-size: 11px;
  }
  .messages {
    padding: 15px;
  }
  .welcome {
    padding: 12px 0;
  }
  .welcome h1 {
    font-size: 27px;
  }
  .welcome p {
    font-size: 13px;
  }
  .welcome-command {
    flex-wrap: nowrap;
    font-size: 10px;
    gap: 8px;
  }
  .welcome-command code {
    width: 136px;
  }
  .welcome .eyebrow {
    font-size: 9px;
  }
  .composer-area {
    padding: 10px;
  }
  .composer {
    padding: 10px;
    gap: 8px;
  }
  #composer-nick {
    max-width: 65px;
  }
  .hint-gap,
  #footer-center,
  footer > span:last-child {
    display: none;
  }
  footer {
    min-height: 28px;
    padding: 4px 12px;
    font-size: 9px;
  }
  .line {
    grid-template-columns: 36px 65px minmax(0, 1fr);
    gap: 6px;
    font-size: 16px;
  }
  .line time {
    font-size: 9px;
  }
  .line.system {
    font-size: 11px;
  }
  .composer-hints {
    font-size: 9px;
  }
  dialog {
    padding: 22px;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition:
      background 0.15s,
      color 0.15s;
  }
}

.setup-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.setup-box {
  width: min(560px, 100%);
  border: 1px solid #3e4b3e;
  background: #181e19;
  padding: 32px;
  border-radius: 8px;
}
.setup-box h1 {
  color: var(--green);
  font-size: 28px;
}
.setup-box p {
  line-height: 1.7;
  color: #aeb8b0;
}
.setup-box label {
  margin-top: 24px;
}
.setup-box input,
.setup-box button {
  width: 100%;
  padding: 12px;
}
.setup-box button {
  margin-top: 12px;
  border: 0;
  background: var(--green);
  color: #182115;
  font-weight: 700;
}
.setup-message {
  padding-left: 12px;
  color: #fff !important;
}
.setup-message.success {
  border-left: 3px solid var(--green);
}
.setup-message.failure {
  border-left: 3px solid #e7a08e;
}
.setup-small {
  font-size: 12px;
  color: var(--muted) !important;
}
