#drawer,
#settings,
#jfcdes {
  position: fixed;
  right: 20px;
  bottom: calc(var(--dock-bottom) + 90px);
  z-index: 25;
  display: none;
  width: min(420px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--glass);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  animation: pop .2s ease both;
}

body.log-open #drawer,
body.settings-open #settings {
  display: block;
}

#log {
  max-height: 40vh;
  overflow: auto;
  font: 12px/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: var(--muted);
  white-space: pre-wrap;
}

#log:empty::before {
  content: "…";
}

/* The JFCDES panel: the log's look and place, opened by the cat's script (class "open"). It gives way
   to the log, the chat, the files and the settings panel, which share the slot. */
#jfcdes.open {
  display: block;
}

body.log-open #jfcdes,
body.chat-open #jfcdes,
body.files-open #jfcdes,
body.settings-open #jfcdes {
  display: none;
}

#jfcdes .panelbtns {
  display: flex;
  gap: 2px;
}

#jfcdes .panel-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  color: var(--muted);
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background .15s, color .15s;
}

#jfcdes .panel-btn:hover {
  color: var(--text);
  background: var(--surface-strong);
}

#jfcdesList {
  max-height: 40vh;
  overflow: auto;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
}

#jfcdesList:empty::before {
  content: "No broadcasts matching your words yet.";
  color: var(--muted);
}

#jfcdesList p {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}

/* The broadcast that a notification pointed at. */
#jfcdesList p.hit {
  margin-left: -8px;
  padding: 4px 8px;
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: var(--surface-strong);
}
