/* Keep the extra preference from overflowing narrow desktop toolbars. */
.score-actions { flex-wrap: wrap; row-gap: 4px; }
/* This wrapper stays fixed while the PDF inside it scrolls. */
.score-reading-area {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.next-line-preview {
  position: absolute;
  z-index: 2;
  box-sizing: border-box;
  margin: 0;
  padding: 8px 9px 9px;
  border: 1px solid var(--green);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 3px 12px #182e3024;
  pointer-events: none;
}
.next-line-preview figcaption {
  height: 20px;
  font-size: 10px;
  line-height: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.next-line-preview svg { display: block; overflow: hidden; background: white; }
.next-line-preview::before {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--paper);
  border: solid var(--green);
  transform: rotate(45deg);
}
.next-line-preview[data-side="right"]::before {
  left: -5px; top: calc(var(--preview-pointer) - 4px); border-width: 0 0 1px 1px;
}
.next-line-preview[data-side="above"]::before {
  bottom: -5px; left: calc(var(--preview-pointer) - 4px); border-width: 0 1px 1px 0;
}
.next-line-preview[data-side="below"]::before {
  top: -5px; left: calc(var(--preview-pointer) - 4px); border-width: 1px 0 0 1px;
}
:root[data-theme="dark"] .next-line-preview svg { background: #cbbd9e; }
:root[data-theme="dark"] .next-line-preview image { mix-blend-mode: multiply; }
