:root {
  color-scheme: dark;
  font:
    16px/1.5 system-ui,
    "Malgun Gothic",
    sans-serif;
  background: #101517;
  color: #eaf0ee;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
main {
  max-width: 1200px;
  margin: auto;
  padding: clamp(16px, 4vw, 48px);
}
header,
.toolbar,
#hosts,
.compose {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
header {
  justify-content: space-between;
}
h1 {
  font-size: clamp(26px, 4vw, 40px);
  margin: 0;
  letter-spacing: -0.04em;
}
small {
  color: #9eb8ad;
}
#status {
  overflow-wrap: anywhere;
  color: #bfcec8;
  min-height: 1.5em;
}
section,
form {
  margin-top: 20px;
}
label {
  display: flex;
  align-items: center;
  gap: 8px;
}
button,
input,
select {
  font: inherit;
  color: inherit;
  background: #1f2928;
  border: 1px solid #43514c;
  border-radius: 7px;
  min-height: 42px;
  padding: 6px 12px;
}
button {
  cursor: pointer;
}
button:disabled,
input:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #a0e2c3;
}
#login,
#control {
  background: #b0e7ca;
  color: #152e23;
}
select {
  max-width: min(75vw, 460px);
}
#pair input {
  width: min(100%, 640px);
  margin: 6px 8px 6px 0;
}
.screen {
  background: #141414;
  border: 1px solid #36413d;
  border-radius: 9px;
  margin: 12px 0;
}
#scroll {
  overflow: auto;
  min-height: 200px;
  max-height: 62dvh;
  padding: 8px;
}
#screen {
  white-space: pre;
  font:
    14px/1.3 "Cascadia Mono",
    Consolas,
    monospace;
  width: max-content;
  min-height: 1lh;
}
.row {
  height: 1.3em;
}
.cell {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  height: 1.3em;
}
.compose {
  position: sticky;
  bottom: 0;
  background: #101517;
  padding: 12px 0;
}
.compose input {
  flex: 1;
  min-width: 6ch;
}
.compose label {
  font-size: 0.9rem;
}
[hidden] {
  display: none !important;
}
@media (max-width: 600px) {
  main {
    padding: 16px 12px;
  }
  .compose label {
    flex-basis: 100%;
  }
  #scroll {
    max-height: 54dvh;
  }
  button {
    min-height: 44px;
  }
  .toolbar {
    gap: 6px;
  }
  .compose {
    gap: 5px;
  }
}
