.library-titlebar,
.library-window-actions,
.library-window-controls {
  display: flex;
  align-items: center;
}

.library-titlebar {
  min-width: 0;
  gap: 18px;
}

.library-window-actions {
  flex: 0 0 auto;
  gap: 8px;
}

.library-theme-slot {
  display: flex;
  align-items: center;
}

.back-home {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding-left: 18px;
  border-left: 1px solid var(--line, rgba(231, 225, 204, .18));
  color: var(--muted, #a8ad9e);
  text-decoration: none;
  font: 9px/1.3 ui-monospace, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.back-home:is(:hover, :focus-visible) {
  color: var(--accent, #8ad7ab);
}

.library-window-controls {
  display: none;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line, rgba(231, 225, 204, .18));
  border-radius: 999px;
}

html.nyarindo-node-view .library-window-controls {
  display: flex;
}

.library-window-control {
  position: relative;
  width: 30px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  color: inherit;
  background: transparent;
  cursor: pointer;
}

.library-window-control:is(:hover, :focus-visible) {
  border-color: var(--line, rgba(231, 225, 204, .18));
  background: color-mix(in srgb, var(--ink, #f1eee4) 8%, transparent);
}

.library-window-control span,
.library-window-control span::before,
.library-window-control span::after {
  position: absolute;
  content: "";
}

.library-minimize span {
  width: 11px;
  height: 1px;
  background: currentColor;
}

.library-close span::before,
.library-close span::after {
  top: 50%;
  left: 50%;
  width: 11px;
  height: 1px;
  background: currentColor;
}

.library-close span::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.library-close span::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.library-close:is(:hover, :focus-visible) {
  border-color: rgba(255, 107, 107, .48);
  background: rgba(203, 42, 55, .9);
  color: #fff;
}

@media (max-width: 720px) {
  .library-titlebar {
    flex-wrap: wrap;
    gap: 10px 16px;
  }

  .back-home {
    padding-left: 14px;
  }
}
