#title-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  /* Transparency in the bg makes it obvious when the list is scrolled. */
  background: rgba(34, 34, 34, 0.6);
  font-size: var(--font-size-xxs);
  border-bottom: 1px solid #555;
  align-items: center;
}
h1,h2 {
  font-size: inherit;
}

.top-padding {
  height: calc(1.2rem * var(--scale));
}

#status {
  position: relative;
  top: -0.2rem;
  margin-left: 0.2rem;
  height: 0.5rem;
  width: 0.5rem;
  border-radius: 5px;
}
#status.white {
  background: #eee;
}
#status.green {
  background: #060;
}
#status.red {
  background: #800;
}
#status.orange {
  background: #840;
}

.button-bar {
  display: flex;
  align-items: flex-end;
}
.button-bar.upper {
  margin-top: 3rem;
}
.button-bar span.left {
  flex: 1 1 auto;
}
.button-bar span.right {
  font-size: var(--font-size-xxs);
  flex: 0 1 auto;
}
.button-bar.lower {
  margin-top: 0.5rem;
  font-size: var(--font-size-xxs);
  justify-content: flex-end;
}

.panel {
  border: 1px solid #fde;
  font-size: var(--font-size-xs);
  min-height: 2rem;
  margin: 1rem 0.1rem 0.7rem 0.1rem;
  padding: 0.2rem;
  padding-top: 0.5rem;
  position: relative;
}
.panel + .panel {
  margin-top: 1.5rem;
}

.panel h2 {
  position: absolute;
  top: 0;
  left: 1ch;
  transform: translateY(-50%);
  padding: 0 0.5ch;
  background: var(--bgcolor);
}

.panel .close {
  position: absolute;
  top: 0;
  right: 1ch;
  transform: translateY(-50%);
}

.panel.log-root .messages {
  font-size: var(--font-size-xxxs);
  white-space: pre-wrap;
  overflow-y: auto;
  overflow-wrap: anywhere; /* Wrap even without spaces */
}

.panel.log-root button.clear {
  position: absolute;
  right: 1ch;
  bottom: 0;
  transform: translateY(50%);
}

/*

** Size-to-fit textareas **

 */

.size-to-fit {
  position: relative;
}
.size-to-fit textarea {
  resize: none;
  overflow: hidden;
  /* Replace mirror technique with this when supported on Mozilla */
  /* field-sizing: content; */
}
.size-to-fit .mirror {
  position: absolute;
  white-space: pre-wrap;
  visibility: hidden;
}
.size-to-fit .mirror::after {
  /* Insert a zero-width space to prevent the collapse of a trailing newline */
  content: "\200B";
}
.mirror {
  outline: 1px dashed red;
  /* Default border size to match a textarea */
  border: 2px solid transparent;
}
