:root {
  color-scheme: dark;
  background: #000;
  color: #fff;
  font: 20px/1.2 system-ui, sans-serif;
  --accent: #ffcf40;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; }
main {
  height: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}
h1, p, pre { margin: 0; }
h1 { font-size: 24px; line-height: 1.25; }
button, textarea { font: inherit; color: #fff; background: #000; }
button {
  min-height: 44px;
  padding: 6px;
  border: 1px solid #fff;
  border-radius: 4px;
  cursor: pointer;
}
button:disabled { opacity: 0.5; cursor: default; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.blocked { color: var(--accent); }
#agents {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 6px;
}
#agent-list { display: grid; gap: 12px; margin-top: 12px; }
#agent-list button { width: 100%; text-align: left; overflow-wrap: anywhere; }
#empty { margin-top: 12px; }
#agent {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto auto auto;
  gap: 8px;
}
#agent-title, #agent-status {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
#agent-message {
  max-height: 48px;
  overflow: hidden;
  overflow-wrap: anywhere;
}
#screen-scroll { min-height: 0; overflow: auto; padding: 6px; }
#screen-text {
  font: 15px/1.3 ui-monospace, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.scroll-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
#keys { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
textarea {
  width: 100%;
  min-width: 0;
  height: 60px;
  padding: 5px;
  border: 1px solid #fff;
  border-radius: 4px;
  resize: none;
}
textarea::placeholder { color: #fff; opacity: 1; }
#result { min-height: 24px; }
#read-error { flex: none; }
#result, #read-error { overflow-wrap: anywhere; }
