:root {
  font-family: Inter, "Noto Sans CJK SC", system-ui, sans-serif;
  color: #dfebe8;
  background: #101817;
  font-size: 14px;
  --muted: #a2b6ae;
  --line: #30413c;
  --panel: #17221e;
  --mint: #92e8c4;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
header,
nav,
.row,
.actions,
.filters,
.keys,
.consoleHead,
#termForm {
  display: flex;
  align-items: center;
  gap: 10px;
}
header {
  height: 60px;
  padding: 0 4vw;
  background: #15221d;
  border-bottom: 1px solid var(--line);
}
header strong {
  font-size: 18px;
}
.symbol {
  font-size: 32px;
  line-height: 1;
  color: var(--mint);
}
.host,
small,
p,
#location {
  color: var(--muted);
}
.host {
  font: 12px monospace;
}
header button,
.row button,
.consoleHead button {
  margin-left: auto;
}
button,
a,
input,
textarea,
select {
  font: inherit;
}
button,
nav a {
  cursor: pointer;
  color: #e2ede8;
  background: #20312a;
  border: 1px solid #3a5145;
  border-radius: 7px;
  padding: 8px 13px;
  text-decoration: none;
}
button:hover,
a:hover {
  border-color: var(--mint);
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
button.primary {
  background: var(--mint);
  color: #153125;
  border: 0;
  font-weight: 700;
}
input,
textarea,
select {
  background: #101b16;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #f1f6f3;
  padding: 10px;
  min-width: 0;
}
input:focus,
textarea:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--mint);
}
nav {
  padding: 12px 4vw;
  border-bottom: 1px solid var(--line);
}
nav button,
nav a {
  border: 0;
  background: none;
}
nav .selected {
  background: #263c32;
  color: var(--mint);
}
nav a {
  margin-left: auto;
}
#chats {
  display: grid;
  grid-template-columns: minmax(290px, 32%) 1fr;
  min-height: 75vh;
}
aside {
  padding: 20px 18px 20px 3vw;
  border-right: 1px solid var(--line);
}
aside > input,
.login input,
select,
textarea,
label input {
  width: 100%;
}
.filters {
  margin: 9px 0;
}
.filters select:first-child {
  flex: 2;
}
.filters select:last-child {
  flex: 1;
}
.row h2 {
  margin: 0 0 12px;
}
small {
  display: block;
  margin: 12px 0 6px;
  overflow-wrap: anywhere;
}
#list {
  max-height: calc(100dvh - 325px);
  overflow: auto;
}
.entry {
  text-align: left;
  display: block;
  width: 100%;
  padding: 12px 9px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.entry.active,
.entry:hover {
  background: #22362d;
}
.entry b {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.entry small {
  font-size: 11px;
  margin: 4px 0 0;
}
h1 {
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.28;
  overflow-wrap: anywhere;
}
h2 {
  font-size: 18px;
}
#conversation {
  padding: 24px 4vw;
  min-width: 0;
}
#empty {
  margin-top: 10vh;
}
#location {
  overflow-wrap: anywhere;
}
.actions {
  flex-wrap: wrap;
  margin: 14px 0;
}
.message,
.card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 10px;
}
.message {
  padding: 14px 18px;
  margin: 12px 0;
}
.message.user {
  border-left: 3px solid var(--mint);
}
.message small {
  margin: 0;
  color: var(--mint);
}
.message pre {
  font: inherit;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 9px 0 0;
}
.login,
.panel {
  max-width: 740px;
  margin: 35px auto;
  padding: 20px;
}
.login {
  max-width: 380px;
  margin: 12vh auto;
  display: grid;
  gap: 12px;
}
.card {
  padding: 20px;
}
label {
  display: block;
  margin: 10px 0;
}
label input,
label textarea,
label select {
  display: block;
  margin: 6px 0;
}
.mobile {
  display: none;
}
#console {
  position: fixed;
  inset: 0;
  background: #101817;
  z-index: 2;
  padding: 12px;
  display: flex;
  flex-direction: column;
}
.consoleHead {
  margin-bottom: 4px;
}
#termHint {
  font-size: 13px;
  margin: 4px 0 8px;
}
#terminal {
  flex: 1;
  min-height: 0;
  background: #101817;
}
.keys {
  padding: 7px 0;
}
.keys button {
  padding: 5px 10px;
}
#termForm input {
  flex: 1;
}
#toast {
  position: fixed;
  bottom: 16px;
  right: 16px;
  max-width: 90vw;
  background: #f0e5c7;
  color: #332608;
  padding: 12px 18px;
  border-radius: 8px;
  z-index: 5;
}
.job {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.job button {
  margin-left: 10px;
}
@media (max-width: 720px) {
  .host {
    display: none;
  }
  header {
    height: 50px;
  }
  #chats {
    display: block;
  }
  aside {
    border: 0;
    padding: 16px;
  }
  .mobile {
    display: block;
  }
  #list {
    max-height: none;
  }
  #conversation {
    display: none;
    padding: 16px;
  }
  .reading #conversation {
    display: block;
  }
  .reading aside {
    display: none;
  }
  .panel {
    padding: 14px;
    margin: 10px auto;
  }
  .login {
    margin: 10vh 16px;
  }
  .keys {
    justify-content: space-between;
  }
  .keys button {
    padding: 7px 10px;
  }
  input,
  textarea,
  select {
    font-size: 16px;
  }
}
