#viewer {
  max-width: 100vw;
}

/* we only enable overflow:auto once needed, as it disables the sticky header */
@media screen and (max-width:839px) {
  #viewer {
    overflow: auto;
  }
}

#viewer > div {
  width: max-content;
  margin: 0 auto;
}

#header {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--accent);
  color: #fff;
  border: solid var(--accent);
  border-width: 0.2rem 0 0.1rem;
}

#separator {
  height: 0.2rem;
}

#viewer > div > div > div {
  contain: content;
  display: grid;
  grid-template-columns: min-content min-content min-content;
  gap: 0.4rem;
}

#content {
  position: relative;
}

#content > div {
  position: absolute;
  left: 0;
  right: 0;
}

.offset {
  padding: 0 0.4rem;
}

:where(#separator, #content) .offset {
  background: var(--grey);
  color: #aaa;
}

.chr {
  margin: 0 0.4rem 0 1rem;
}

.highlighted {
  position: absolute;
  z-index: 1;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  text-align: center;
  pointer-events: none;
}
